On master, it seems that rustls version has been bumped but changes haven't been made. I get this when compiling:
error[E0432]: unresolved imports `rustls::Certificate`, `rustls::PrivateKey`
--> src/tls_rustls/mod.rs:36:14
|
36 | use rustls::{Certificate, PrivateKey, ServerConfig};
| ^^^^^^^^^^^ ^^^^^^^^^^ no `PrivateKey` in the root
| |
| no `Certificate` in the root
|
= help: consider importing one of these items instead:
rustls::HandshakeType::Certificate
rustls::internal::msgs::handshake::HandshakePayload::Certificate
error[E0277]: the trait bound `TlsAcceptor: From<Arc<rustls::ServerConfig>>` is not satisfied
--> src/tls_rustls/future.rs:84:44
|
84 | ... let acceptor = TlsAcceptor::from(server_config);
| ^^^^^^^^^^^ the trait `From<Arc<rustls::ServerConfig>>` is not implemented for `TlsAcceptor`
|
= help: the trait `From<Arc<tokio_rustls::rustls::ServerConfig>>` is implemented for `TlsAcceptor`
= help: for that trait implementation, expected `tokio_rustls::rustls::ServerConfig`, found `rustls::ServerConfig`
error[E0599]: no method named `with_safe_defaults` found for struct `rustls::ConfigBuilder` in the current scope
--> src/tls_rustls/mod.rs:273:10
|
272 | let mut config = ServerConfig::builder()
| ______________________-
273 | | .with_safe_defaults()
| | -^^^^^^^^^^^^^^^^^^ method not found in `ConfigBuilder<ServerConfig, WantsVerifier>`
| |_________|
|
error[E0277]: the `?` operator can only be applied to values that implement `Try`
--> src/tls_rustls/mod.rs:286:16
|
286 | let cert = rustls_pemfile::certs(&mut cert.as_ref())?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `?` operator cannot be applied to type `impl Iterator<Item = Result<rustls_pki_types::CertificateDer<'static>, std::io::Error>> + '_`
|
= help: the trait `Try` is not implemented for `impl Iterator<Item = Result<rustls_pki_types::CertificateDer<'static>, std::io::Error>> + '_`
error[E0277]: the `?` operator can only be applied to values that implement `Try`
--> src/tls_rustls/mod.rs:288:37
|
288 | let mut key_vec: Vec<Vec<u8>> = rustls_pemfile::read_all(&mut key.as_ref())?
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `?` operator cannot be applied to type `impl Iterator<Item = Result<Item, std::io::Error>> + '_`
|
= help: the trait `Try` is not implemented for `impl Iterator<Item = Result<Item, std::io::Error>> + '_`
error[E0599]: no variant or associated item named `RSAKey` found for enum `Item` in the current scope
--> src/tls_rustls/mod.rs:291:19
|
291 | Item::RSAKey(key) | Item::PKCS8Key(key) | Item::ECKey(key) => Some(key),
| ^^^^^^ variant or associated item not found in `Item`
error[E0599]: no variant or associated item named `PKCS8Key` found for enum `Item` in the current scope
--> src/tls_rustls/mod.rs:291:39
|
291 | Item::RSAKey(key) | Item::PKCS8Key(key) | Item::ECKey(key) => Some(key),
| ^^^^^^^^
| |
| variant or associated item not found in `Item`
| help: there is a variant with a similar name (notice the capitalization): `Pkcs8Key`
error[E0599]: no variant or associated item named `ECKey` found for enum `Item` in the current scope
--> src/tls_rustls/mod.rs:291:61
|
291 | Item::RSAKey(key) | Item::PKCS8Key(key) | Item::ECKey(key) => Some(key),
| ^^^^^ variant or associated item not found in `Item`
On master, it seems that rustls version has been bumped but changes haven't been made. I get this when compiling: