Skip to content

Commit

Permalink
deleted unused dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
FranciscaOrtegaG committed Dec 26, 2024
1 parent 3d84179 commit 1c58101
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 257 deletions.
255 changes: 33 additions & 222 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,9 @@ sha2 = "0.10.2"
hmac = "0.12.1"
rust-crypto = "0.2"
base64 = "0.22.1"
tokio-tls = "0.3.1"
lru = "0.12.3"
rustls = "0.23.12"
openssl = "0.10.66"
tokio-rustls = "0.26.0"
webpki = "0.22.4"
webpki-roots = "0.26.3"
rustls-native-certs = "0.8.0"
[lib]
doctest = false
2 changes: 0 additions & 2 deletions src/async_resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ use std::net::IpAddr;
use std::time::SystemTime;
use std::sync::{Arc, Mutex};
use std::vec;
use std::collections::HashMap;

/// Asynchronous resolver for DNS queries.
///
/// This struct contains a cache and a configuration for the resolver.
Expand Down
4 changes: 1 addition & 3 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ pub mod tls_connection;
pub mod udp_connection;
pub mod client_error;

use crate::message::rdata::Rdata;
use crate::message::rrtype::Rrtype;
use crate::client::client_connection::ClientConnection;
use crate::message::DnsMessage;
use crate::domain_name::DomainName;


use rustls::Connection;
use rustls::ClientConfig;

use rand::{thread_rng, Rng};

use self::client_error::ClientError;
Expand Down
10 changes: 0 additions & 10 deletions src/client/tcp_connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,15 @@ use crate::message::rdata::a_rdata::ARdata;
use crate::message::resource_record::ResourceRecord;
use super::client_error::ClientError;
use async_trait::async_trait;
use futures_util::TryFutureExt;
use rustls::pki_types::ServerName;
use rustls::server;
use rustls::Stream;
use webpki::DnsNameRef;
use std::convert::TryFrom;
use std::io::Error as IoError;
use std::io::ErrorKind;
use std::iter::FromIterator;
use tokio::io::AsyncWriteExt;
use tokio::io::AsyncReadExt;
use tokio::net::TcpStream;
use std::net::IpAddr;
use std::net::SocketAddr;
use tokio::time::Duration;
use tokio::time::timeout;
use tokio_rustls::rustls::ClientConfig;
use tokio_rustls::TlsConnector;
use std::sync::Arc;

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct ClientTCPConnection {
Expand Down
11 changes: 1 addition & 10 deletions src/client/tls_connection.rs
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
use crate::client::ClientConnection;

use crate::message::DnsMessage;
use crate::message::rdata::Rdata;
use crate::message::rdata::a_rdata::ARdata;
use crate::message::resource_record::ResourceRecord;
use super::client_connection::ConnectionProtocol;
use super::client_error::ClientError;
use super::client_security::ClientSecurity;
use async_trait::async_trait;
use futures_util::TryFutureExt;
use rustls::pki_types::ServerName;
use rustls::server;
use rustls::Stream;
use rustls::RootCertStore;
use webpki::DnsNameRef;
use std::convert::TryFrom;
use std::io::Error as IoError;
use std::io::ErrorKind;
use std::io::Write;
use std::iter::FromIterator;
use tokio::io::AsyncWriteExt;
use tokio::io::AsyncReadExt;
use tokio::net::TcpStream;
Expand All @@ -27,7 +19,6 @@ use tokio::time::Duration;
use tokio::time::timeout;
use tokio_rustls::rustls::ClientConfig;
use tokio_rustls::TlsConnector;
use tokio_rustls::TlsStream;
use std::sync::Arc;

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
Expand Down
3 changes: 1 addition & 2 deletions src/example.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
pub mod dotcp;
pub mod dotls;
pub mod doudp;
pub mod resolverexample;
pub mod doudp;
6 changes: 2 additions & 4 deletions src/example/dotls.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};
use std::net::{IpAddr, Ipv4Addr};
use std::time::Duration;
use tokio::runtime::Runtime;
use crate::client::client_connection::ClientConnection;
use crate::client::client_security::ClientSecurity;
use crate::client::tcp_connection::ClientTCPConnection;
use crate::client::tls_connection::ClientTLSConnection;
use crate::domain_name::DomainName;
use crate::message::rclass::Rclass;
Expand All @@ -24,7 +22,7 @@ fn main() -> Result<(), ClientError> {
Rclass::IN,
0,
false,
1);;
1);

rt.block_on(async {
match tls_connection.send(dns_query).await {
Expand Down

0 comments on commit 1c58101

Please sign in to comment.