From 3dc594a00bc50b91744679c58b73c320146103f3 Mon Sep 17 00:00:00 2001 From: Marat Safin Date: Wed, 31 Jul 2019 08:56:59 +0300 Subject: [PATCH] remove test-server and Cargo.toml dev-dependencies changes --- actix-files/Cargo.toml | 2 +- actix-framed/Cargo.toml | 4 +++- actix-http/Cargo.toml | 8 ++++++-- actix-identity/Cargo.toml | 3 ++- actix-multipart/Cargo.toml | 3 ++- actix-session/Cargo.toml | 3 +++ actix-web-actors/Cargo.toml | 3 ++- actix-web-codegen/Cargo.toml | 8 ++++---- awc/Cargo.toml | 16 ++++++++++----- test-server/Cargo.toml | 11 ++++------ test-server/src/lib.rs | 39 ++---------------------------------- 11 files changed, 40 insertions(+), 60 deletions(-) diff --git a/actix-files/Cargo.toml b/actix-files/Cargo.toml index e5292a459..307e79060 100644 --- a/actix-files/Cargo.toml +++ b/actix-files/Cargo.toml @@ -32,4 +32,4 @@ percent-encoding = "1.0" v_htmlescape = "0.4" [dev-dependencies] -actix-web = { version = "1.0.2", features = ["flate2-zlib"] } +actix-web = { version = "1.0.2", features=["ssl"] } diff --git a/actix-framed/Cargo.toml b/actix-framed/Cargo.toml index cf327c31f..321041c7e 100644 --- a/actix-framed/Cargo.toml +++ b/actix-framed/Cargo.toml @@ -32,5 +32,7 @@ futures = "0.1.25" log = "0.4" [dev-dependencies] -actix-http-test = "0.2.4" +actix-server = { version = "0.6.0", features=["ssl"] } +actix-connect = { version = "0.2.0", features=["ssl"] } +actix-http-test = { version = "0.2.4", features=["ssl"] } actix-utils = "0.4.4" diff --git a/actix-http/Cargo.toml b/actix-http/Cargo.toml index 2498a4f35..ad626eb15 100644 --- a/actix-http/Cargo.toml +++ b/actix-http/Cargo.toml @@ -100,6 +100,10 @@ chrono = "0.4.6" [dev-dependencies] actix-rt = "0.2.2" -actix-server = "0.6.0" -actix-http-test = { version = "0.2.4", features = ["rust-tls", "ssl"] } +actix-server = { version = "0.6.0", features=["ssl"] } +actix-connect = { version = "0.2.0", features=["ssl"] } +actix-http-test = { version = "0.2.4", features=["ssl"] } env_logger = "0.6" +serde_derive = "1.0" +openssl = { version="0.10" } +tokio-tcp = "0.1" diff --git a/actix-identity/Cargo.toml b/actix-identity/Cargo.toml index f622d67ea..e645275a2 100644 --- a/actix-identity/Cargo.toml +++ b/actix-identity/Cargo.toml @@ -25,5 +25,6 @@ serde_json = "1.0" time = "0.1.42" [dev-dependencies] +actix-rt = "0.2.2" actix-http = "0.2.3" -bytes = "0.4" +bytes = "0.4" \ No newline at end of file diff --git a/actix-multipart/Cargo.toml b/actix-multipart/Cargo.toml index 134f9d785..b26681e25 100644 --- a/actix-multipart/Cargo.toml +++ b/actix-multipart/Cargo.toml @@ -30,4 +30,5 @@ time = "0.1" twoway = "0.2" [dev-dependencies] -actix-http = "0.2.4" +actix-rt = "0.2.2" +actix-http = "0.2.4" \ No newline at end of file diff --git a/actix-session/Cargo.toml b/actix-session/Cargo.toml index bc4df2b62..d973661ef 100644 --- a/actix-session/Cargo.toml +++ b/actix-session/Cargo.toml @@ -33,3 +33,6 @@ hashbrown = "0.5.0" serde = "1.0" serde_json = "1.0" time = "0.1.42" + +[dev-dependencies] +actix-rt = "0.2.2" diff --git a/actix-web-actors/Cargo.toml b/actix-web-actors/Cargo.toml index 6be2d233d..356109da5 100644 --- a/actix-web-actors/Cargo.toml +++ b/actix-web-actors/Cargo.toml @@ -26,4 +26,5 @@ bytes = "0.4" futures = "0.1.25" [dev-dependencies] -actix-http-test = "0.2.4" +env_logger = "0.6" +actix-http-test = { version = "0.2.4", features=["ssl"] } diff --git a/actix-web-codegen/Cargo.toml b/actix-web-codegen/Cargo.toml index bf021065f..29abb4897 100644 --- a/actix-web-codegen/Cargo.toml +++ b/actix-web-codegen/Cargo.toml @@ -16,7 +16,7 @@ quote = "0.6.12" syn = { version = "0.15.34", features = ["full", "parsing", "extra-traits"] } [dev-dependencies] -actix-web = "1.0.0" -actix-http = "0.2.4" -actix-http-test = "0.2.0" -futures = "0.1" +actix-web = { version = "1.0.0" } +actix-http = { version = "0.2.4", features=["ssl"] } +actix-http-test = { version = "0.2.0", features=["ssl"] } +futures = { version = "0.1" } diff --git a/awc/Cargo.toml b/awc/Cargo.toml index 3abc0edb1..84baf4fb6 100644 --- a/awc/Cargo.toml +++ b/awc/Cargo.toml @@ -62,9 +62,15 @@ rustls = { version = "0.15.2", optional = true } [dev-dependencies] actix-rt = "0.2.2" -actix-web = "1.0.0" -actix-http-test = { version = "0.2.4", features = ["ssl", "rust-tls"] } -actix-server = "0.6.0" -brotli2 = "0.3.2" -flate2 = "1.0.2" +actix-web = { version = "1.0.0", features=["ssl"] } +actix-http = { version = "0.2.4", features=["ssl"] } +actix-http-test = { version = "0.2.0", features=["ssl"] } +actix-utils = "0.4.1" +actix-server = { version = "0.6.0", features=["ssl", "rust-tls"] } +brotli2 = { version="0.3.2" } +flate2 = { version="1.0.2" } +env_logger = "0.6" +rand = "0.7" +tokio-tcp = "0.1" webpki = "0.19" +rustls = { version = "0.15.2", features = ["dangerous_configuration"] } diff --git a/test-server/Cargo.toml b/test-server/Cargo.toml index e5e83b16e..fff96893d 100644 --- a/test-server/Cargo.toml +++ b/test-server/Cargo.toml @@ -27,18 +27,16 @@ path = "src/lib.rs" default = [] # openssl -ssl = ["openssl", "actix-server/ssl", "awc/ssl", "actix-http/ssl"] -rust-tls = ["rustls", "webpki", "actix-server/rust-tls", "awc/rust-tls", "actix-http/rust-tls"] +ssl = ["openssl", "actix-server/ssl", "awc/ssl"] [dependencies] actix-codec = "0.1.2" -actix-connect = "0.2" -actix-rt = "0.2.4" +actix-rt = "0.2.2" actix-service = "0.4.1" actix-server = "0.6.0" actix-utils = "0.4.1" -actix-http = "0.2.8" awc = "0.2.2" +actix-connect = "0.2.2" base64 = "0.10" bytes = "0.4" @@ -56,8 +54,7 @@ time = "0.1" tokio-tcp = "0.1" tokio-timer = "0.2" openssl = { version="0.10", optional = true } -rustls = { version = "0.15.2", optional = true, features = ["dangerous_configuration"] } -webpki = { version = "0.19", optional = true } [dev-dependencies] actix-web = "1.0.0" +actix-http = "0.2.4" diff --git a/test-server/src/lib.rs b/test-server/src/lib.rs index afc38fb2b..aa66bdf84 100644 --- a/test-server/src/lib.rs +++ b/test-server/src/lib.rs @@ -69,23 +69,6 @@ where RT.with(move |rt| rt.borrow_mut().get_mut().block_on(lazy(f))) } -#[cfg(feature = "rust-tls")] -mod danger { - pub struct NoCertificateVerification {} - - impl rustls::ServerCertVerifier for NoCertificateVerification { - fn verify_server_cert( - &self, - _roots: &rustls::RootCertStore, - _presented_certs: &[rustls::Certificate], - _dns_name: webpki::DNSNameRef<'_>, - _ocsp: &[u8], - ) -> Result { - Ok(rustls::ServerCertVerified::assertion()) - } - } -} - /// The `TestServer` type. /// /// `TestServer` is very simple test server that simplify process of writing @@ -168,25 +151,7 @@ impl TestServer { .ssl(builder.build()) .finish() } - #[cfg(all(not(feature = "ssl"), feature = "rust-tls"))] - { - use rustls::ClientConfig; - use std::sync::Arc; - - let mut config = ClientConfig::new(); - let protos = vec![b"h2".to_vec(), b"http/1.1".to_vec()]; - config.set_protocols(&protos); - config.dangerous().set_certificate_verifier(Arc::new( - danger::NoCertificateVerification {}, - )); - - Connector::new() - .conn_lifetime(time::Duration::from_secs(0)) - .timeout(time::Duration::from_millis(500)) - .rustls(Arc::new(config)) - .finish() - } - #[cfg(not(any(feature = "ssl", feature = "rust-tls")))] + #[cfg(not(feature = "ssl"))] { Connector::new() .conn_lifetime(time::Duration::from_secs(0)) @@ -201,7 +166,7 @@ impl TestServer { rt.block_on(lazy( || Ok::<_, ()>(actix_connect::start_default_resolver()), )) - .unwrap(); + .unwrap(); System::set_current(system); TestServerRuntime { addr, rt, client } }