From bc51d800ff13216df65fe87eab4a5853814566c1 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Fri, 14 Oct 2022 16:46:27 +0200 Subject: [PATCH] Log ssl errors --- ntex-tls/CHANGES.md | 4 ++++ ntex-tls/Cargo.toml | 4 ++-- ntex-tls/src/openssl/mod.rs | 5 ++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ntex-tls/CHANGES.md b/ntex-tls/CHANGES.md index c247fa21..e41fd57f 100644 --- a/ntex-tls/CHANGES.md +++ b/ntex-tls/CHANGES.md @@ -1,5 +1,9 @@ # Changes +## [0.1.6] - 2022-10-14 + +* Allow extracting TLS SNI server name and TLS PSK identity #136 + ## [0.1.5] - 2022-02-19 * Fix rustls hangs during handshake #103 diff --git a/ntex-tls/Cargo.toml b/ntex-tls/Cargo.toml index 6bb4ca3c..854f5740 100644 --- a/ntex-tls/Cargo.toml +++ b/ntex-tls/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ntex-tls" -version = "0.1.5" +version = "0.1.6" authors = ["ntex contributors "] description = "An implementation of SSL streams for ntex backed by OpenSSL" keywords = ["network", "framework", "async", "futures"] @@ -29,6 +29,7 @@ ntex-bytes = "0.1.14" ntex-io = "0.1.8" ntex-util = "0.1.15" ntex-service = "0.3.1" +log = "0.4" pin-project-lite = "0.2" # openssl @@ -39,7 +40,6 @@ tls_rust = { version = "0.20", package = "rustls", optional = true } [dev-dependencies] ntex = { version = "0.5", features = ["openssl", "rustls", "tokio"] } -log = "0.4" env_logger = "0.9" rustls-pemfile = { version = "0.2" } webpki-roots = { version = "0.22" } diff --git a/ntex-tls/src/openssl/mod.rs b/ntex-tls/src/openssl/mod.rs index 9696925b..6b9b2a68 100644 --- a/ntex-tls/src/openssl/mod.rs +++ b/ntex-tls/src/openssl/mod.rs @@ -217,7 +217,10 @@ impl Filter for SslFilter { io.want_shutdown(None); Ok((dst.len(), new_bytes)) } - Err(e) => Err(map_to_ioerr(e)), + Err(e) => { + log::trace!("SSL Error: {:?}", e); + Err(map_to_ioerr(e)) + } }; self.release_read_buf(dst); return result;