Upgrade rustls version to 0.21 (#201)

* Upgrade rustls version to 0.21
This commit is contained in:
Cris Liao 2023-06-15 13:43:25 +08:00 committed by Nikolay Kim
parent 0e1f0b5f73
commit e151b1eff1
2 changed files with 2 additions and 2 deletions

View file

@ -36,7 +36,7 @@ pin-project-lite = "0.2"
tls_openssl = { version="0.10", package = "openssl", optional = true }
# rustls
tls_rust = { version = "0.20", package = "rustls", optional = true }
tls_rust = { version = "0.21", package = "rustls", optional = true }
[dev-dependencies]
ntex = { version = "0.6.3", features = ["openssl", "rustls", "tokio"] }

View file

@ -53,7 +53,7 @@ impl FilterLayer for TlsServerFilter {
None
}
} else if id == any::TypeId::of::<Servername>() {
if let Some(name) = self.session.borrow().sni_hostname() {
if let Some(name) = self.session.borrow().server_name() {
Some(Box::new(Servername(name.to_string())))
} else {
None