From a57da1b3f37f3ca7e9e7ce0e4b40c7f1f1315327 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Sun, 19 Dec 2021 11:15:21 +0600 Subject: [PATCH] prep release and update tests --- ntex-io/Cargo.toml | 2 +- ntex-rt/Cargo.toml | 2 +- ntex-tls/CHANGES.md | 5 +++++ ntex/Cargo.toml | 2 +- ntex/tests/web_httpserver.rs | 4 ++-- ntex/tests/web_server.rs | 12 ++++++------ tests/cert.pem | 19 ------------------- tests/key.pem | 28 ---------------------------- 8 files changed, 16 insertions(+), 58 deletions(-) create mode 100644 ntex-tls/CHANGES.md delete mode 100644 tests/cert.pem delete mode 100644 tests/key.pem diff --git a/ntex-io/Cargo.toml b/ntex-io/Cargo.toml index 39114a7d..d77a6e80 100644 --- a/ntex-io/Cargo.toml +++ b/ntex-io/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ntex-io" -version = "0.1.0-b.0" +version = "0.1.0-b.1" authors = ["ntex contributors "] description = "Utilities for encoding and decoding frames" keywords = ["network", "framework", "async", "futures"] diff --git a/ntex-rt/Cargo.toml b/ntex-rt/Cargo.toml index 0c13b321..8c91292b 100644 --- a/ntex-rt/Cargo.toml +++ b/ntex-rt/Cargo.toml @@ -23,7 +23,7 @@ tokio = ["tok-io", "ntex-io/tokio"] [dependencies] ntex-bytes = "0.1.8" -ntex-io = "0.1.0-b.0" +ntex-io = "0.1.0-b.1" ntex-util = "0.1.3" async-oneshot = "0.5.0" async-channel = "1.6.1" diff --git a/ntex-tls/CHANGES.md b/ntex-tls/CHANGES.md new file mode 100644 index 00000000..285a1381 --- /dev/null +++ b/ntex-tls/CHANGES.md @@ -0,0 +1,5 @@ +# Changes + +## [0.1.0-b.0] - 2021-12-19 + +* Initial impl diff --git a/ntex/Cargo.toml b/ntex/Cargo.toml index 1bde6f52..9a93a9e7 100644 --- a/ntex/Cargo.toml +++ b/ntex/Cargo.toml @@ -46,7 +46,7 @@ ntex-macros = "0.1.3" ntex-util = "0.1.3" ntex-bytes = "0.1.8" ntex-tls = "0.1.0-b.0" -ntex-io = "0.1.0-b.0" +ntex-io = "0.1.0-b.1" ntex-rt = { version = "0.4.0-b.0", default-features = false, features = ["tokio"] } base64 = "0.13" diff --git a/ntex/tests/web_httpserver.rs b/ntex/tests/web_httpserver.rs index b4df3e95..933d389d 100644 --- a/ntex/tests/web_httpserver.rs +++ b/ntex/tests/web_httpserver.rs @@ -148,7 +148,7 @@ async fn test_rustls() { use std::{fs::File, io::BufReader}; use ntex::web::HttpRequest; - use rustls_pemfile::{certs, pkcs8_private_keys}; + use rustls_pemfile::{certs, rsa_private_keys}; use tls_rustls::{Certificate, PrivateKey, ServerConfig as RustlsServerConfig}; let addr = TestServer::unused_addr(); @@ -165,7 +165,7 @@ async fn test_rustls() { .iter() .map(|c| Certificate(c.to_vec())) .collect(); - let keys = PrivateKey(pkcs8_private_keys(key_file).unwrap().remove(0)); + let keys = PrivateKey(rsa_private_keys(key_file).unwrap().remove(0)); let config = RustlsServerConfig::builder() .with_safe_defaults() .with_no_client_auth() diff --git a/ntex/tests/web_server.rs b/ntex/tests/web_server.rs index 7b1ed9fd..367ccedc 100644 --- a/ntex/tests/web_server.rs +++ b/ntex/tests/web_server.rs @@ -852,7 +852,7 @@ async fn test_brotli_encoding_large_openssl_h2() { async fn test_reading_deflate_encoding_large_random_rustls() { use std::{fs::File, io::BufReader}; - use rustls_pemfile::{certs, pkcs8_private_keys}; + use rustls_pemfile::{certs, rsa_private_keys}; use tls_rustls::{Certificate, PrivateKey, ServerConfig}; let data = rand::thread_rng() @@ -869,7 +869,7 @@ async fn test_reading_deflate_encoding_large_random_rustls() { .iter() .map(|c| Certificate(c.to_vec())) .collect(); - let keys = PrivateKey(pkcs8_private_keys(key_file).unwrap().remove(0)); + let keys = PrivateKey(rsa_private_keys(key_file).unwrap().remove(0)); let config = ServerConfig::builder() .with_safe_defaults() .with_no_client_auth() @@ -908,7 +908,7 @@ async fn test_reading_deflate_encoding_large_random_rustls() { #[cfg(all(feature = "rustls", feature = "openssl"))] #[ntex::test] async fn test_reading_deflate_encoding_large_random_rustls_h1() { - use rustls_pemfile::{certs, pkcs8_private_keys}; + use rustls_pemfile::{certs, rsa_private_keys}; use std::fs::File; use std::io::BufReader; use tls_rustls::{Certificate, PrivateKey, ServerConfig}; @@ -927,7 +927,7 @@ async fn test_reading_deflate_encoding_large_random_rustls_h1() { .iter() .map(|c| Certificate(c.to_vec())) .collect(); - let keys = PrivateKey(pkcs8_private_keys(key_file).unwrap().remove(0)); + let keys = PrivateKey(rsa_private_keys(key_file).unwrap().remove(0)); let config = ServerConfig::builder() .with_safe_defaults() .with_no_client_auth() @@ -968,7 +968,7 @@ async fn test_reading_deflate_encoding_large_random_rustls_h1() { async fn test_reading_deflate_encoding_large_random_rustls_h2() { use std::{fs::File, io::BufReader}; - use rustls_pemfile::{certs, pkcs8_private_keys}; + use rustls_pemfile::{certs, rsa_private_keys}; use tls_rustls::{Certificate, PrivateKey, ServerConfig}; let data = rand::thread_rng() @@ -985,7 +985,7 @@ async fn test_reading_deflate_encoding_large_random_rustls_h2() { .iter() .map(|c| Certificate(c.to_vec())) .collect(); - let keys = PrivateKey(pkcs8_private_keys(key_file).unwrap().remove(0)); + let keys = PrivateKey(rsa_private_keys(key_file).unwrap().remove(0)); let config = ServerConfig::builder() .with_safe_defaults() .with_no_client_auth() diff --git a/tests/cert.pem b/tests/cert.pem deleted file mode 100644 index 0eeb6721..00000000 --- a/tests/cert.pem +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDEDCCAfgCCQCQdmIZc/Ib/jANBgkqhkiG9w0BAQsFADBKMQswCQYDVQQGEwJ1 -czELMAkGA1UECAwCY2ExCzAJBgNVBAcMAnNmMSEwHwYJKoZIhvcNAQkBFhJmYWZo -cmQ5MUBnbWFpbC5jb20wHhcNMTkxMTE5MTEwNjU1WhcNMjkxMTE2MTEwNjU1WjBK -MQswCQYDVQQGEwJ1czELMAkGA1UECAwCY2ExCzAJBgNVBAcMAnNmMSEwHwYJKoZI -hvcNAQkBFhJmYWZocmQ5MUBnbWFpbC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IB -DwAwggEKAoIBAQDcnaz12CKzUL7248V7Axhms/O9UQXfAdw0yolEfC3P5jADa/1C -+kLWKjAc2coqDSbGsrsR6KiH2g06Kunx+tSGqUO+Sct7HEehmxndiSwx/hfMWezy -XRe/olcHFTeCk/Tllz4xGEplhPua6GLhJygLOhAMiV8cwCYrgyPqsDduExLDFCqc -K2xntIPreumXpiE3QY4+MWyteiJko4IWDFf/UwwsdCY5MlFfw1F/Uv9vz7FfOfvu -GccHd/ex8cOwotUqd6emZb+0bVE24Sv8U+yLnHIVx/tOkxgMAnJEpAnf2G3Wp3zU -b2GJosbmfGaf+xTfnGGhTLLL7kCtva+NvZr5AgMBAAEwDQYJKoZIhvcNAQELBQAD -ggEBANftoL8zDGrjCwWvct8kOOqset2ukK8vjIGwfm88CKsy0IfSochNz2qeIu9R -ZuO7c0pfjmRkir9ZQdq9vXgG3ccL9UstFsferPH9W3YJ83kgXg3fa0EmCiN/0hwz -6Ij1ZBiN1j3+d6+PJPgyYFNu2nGwox5mJ9+aRAGe0/9c63PEOY8P2TI4HsiPmYSl -fFR8k/03vr6e+rTKW85BgctjvYKe/TnFxeCQ7dZ+na7vlEtch4tNmy6O/vEk2kCt -5jW0DUxhmRsv2wGmfFRI0+LotHjoXQQZi6nN5aGL3odaGF3gYwIVlZNd3AdkwDQz -BzG0ZwXuDDV9bSs3MfWEWcy4xuU= ------END CERTIFICATE----- diff --git a/tests/key.pem b/tests/key.pem deleted file mode 100644 index a6d30816..00000000 --- a/tests/key.pem +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDcnaz12CKzUL72 -48V7Axhms/O9UQXfAdw0yolEfC3P5jADa/1C+kLWKjAc2coqDSbGsrsR6KiH2g06 -Kun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