Skip to content

Commit 5d30d12

Browse files
committed
Updates for the released version of rustls 0.20
Disables sct validation with certificate transparency logs, which can't be enabled without a bunch of intrusive policies to deal with validity/expiration.
1 parent f795f11 commit 5d30d12

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ repository = "https://github.com/ctz/hyper-rustls"
1313
log = "0.4.4"
1414
ct-logs = { version = "^0.9", optional = true }
1515
hyper = { version = "0.14", default-features = false, features = ["client", "http1"] }
16-
rustls = { git = "https://github.com/ctz/rustls" }
17-
rustls-native-certs = { git = "https://github.com/djc/rustls-native-certs", rev = "6116ef59f5825b0ec74a38807635a70433d68c27", optional = true }
16+
rustls = "0.20"
17+
rustls-native-certs = { git = "https://github.com/djc/rustls-native-certs", branch = "no-rustls", optional = true }
1818
rustls-pemfile = { version = "0.2.1" }
1919
tokio = "1.0"
20-
tokio-rustls = { version = "0.23", git = "https://github.com/tokio-rs/tls", rev = "b433932bf1025960e5b99f353cf8eee4ce2f08f3" }
20+
tokio-rustls = { version = "0.23", git = "https://github.com/tokio-rs/tls" }
2121
webpki = "0.22.0"
2222
webpki-roots = { version = "0.22", optional = true }
2323

examples/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ async fn run_client() -> io::Result<()> {
5656
// Build a TLS client, using the custom CA store for lookups.
5757
let tls = rustls::ClientConfig::builder()
5858
.with_safe_defaults()
59-
.with_root_certificates(roots, &ct_logs::LOGS)
59+
.with_root_certificates(roots)
6060
.with_no_client_auth();
6161
// Join the above part into an HTTPS connector.
6262
hyper_rustls::HttpsConnector::from((http, tls))

src/connector.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ impl HttpsConnector<HttpConnector> {
8181
config.alpn_protocols.push(b"http/1.1".to_vec());
8282
}
8383

84+
//let mut config = ClientConfig::builder()
85+
// .with_safe_defaults()
86+
// .with_root_certificates(roots)
87+
// //.with_certificate_transparency_logs(ct_logs::LOGS, XXX)
88+
// .with_no_client_auth();
89+
8490
(http, config).into()
8591
}
8692
}

src/stream.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use hyper::client::connect::{Connected, Connection};
88

99
use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};
1010
use tokio_rustls::client::TlsStream;
11-
use tokio_rustls::rustls::{Connection as _};
1211

1312
/// A stream that might be protected with TLS.
1413
pub enum MaybeHttpsStream<T> {

0 commit comments

Comments
 (0)