mirror of https://github.com/rwf2/Rocket.git
Update 'rustls' to 0.21, 'tokio-rustls' to 0.24.
This commit is contained in:
parent
1a66e50be0
commit
fbb0ace529
|
@ -30,8 +30,8 @@ percent-encoding = "2"
|
|||
http = "0.2"
|
||||
time = { version = "0.3", features = ["formatting", "macros"] }
|
||||
indexmap = { version = "1.5.2", features = ["std"] }
|
||||
rustls = { version = "0.20", optional = true }
|
||||
tokio-rustls = { version = "0.23.4", optional = true }
|
||||
rustls = { version = "0.21", optional = true }
|
||||
tokio-rustls = { version = "0.24", optional = true }
|
||||
rustls-pemfile = { version = "1.0.2", optional = true }
|
||||
tokio = { version = "1.6.1", features = ["net", "sync", "time"] }
|
||||
log = "0.4"
|
||||
|
|
|
@ -86,11 +86,11 @@ impl TlsListener {
|
|||
|
||||
let client_auth = match c.ca_certs {
|
||||
Some(ref mut ca_certs) => match load_ca_certs(ca_certs) {
|
||||
Ok(ca_roots) if c.mandatory_mtls => AllowAnyAuthenticatedClient::new(ca_roots),
|
||||
Ok(ca_roots) => AllowAnyAnonymousOrAuthenticatedClient::new(ca_roots),
|
||||
Ok(ca) if c.mandatory_mtls => AllowAnyAuthenticatedClient::new(ca).boxed(),
|
||||
Ok(ca) => AllowAnyAnonymousOrAuthenticatedClient::new(ca).boxed(),
|
||||
Err(e) => return Err(io::Error::new(e.kind(), format!("bad CA cert(s): {}", e))),
|
||||
},
|
||||
None => NoClientAuth::new(),
|
||||
None => NoClientAuth::boxed(),
|
||||
};
|
||||
|
||||
let mut tls_config = ServerConfig::builder()
|
||||
|
|
Loading…
Reference in New Issue