Skip to content

Commit

Permalink
Merge pull request #1 from remind101/fix-sec-0052
Browse files Browse the repository at this point in the history
update deps to fix sec-0052
  • Loading branch information
rex-remind101 authored Oct 2, 2023
2 parents 9761c74 + 35a9650 commit fc9b19c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 33 deletions.
48 changes: 22 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ edition = "2021"
[dependencies]
log = "0.4"

rustls = "0.20"
rustls-pemfile = "1.0.1"
webpki-roots = "0.22"
rustls = "0.21"
rustls-pemfile = "1.0.3"
webpki-roots = "0.25"

tokio-rustls = "0.23"
tokio-rustls = "0.24"
tokio = { version = "1", features = ["net", "rt"] }

hyper = { version = "0.14", features = ["client", "http2", "h2"] }
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl AlpnConnector {
let config = self
.config_builder
.clone()
.with_single_cert(cert_chain, rustls::PrivateKey(key_der));
.with_client_auth_cert(cert_chain, rustls::PrivateKey(key_der));
match config {
Ok(mut c) => {
c.alpn_protocols.push("h2".as_bytes().to_vec());
Expand Down Expand Up @@ -196,8 +196,8 @@ impl AlpnConnector {
fn with_client_config(config: ConfigBuilder<ClientConfig, WantsCipherSuites>) -> Self {
let mut root_cert_store = rustls::RootCertStore::empty();

root_cert_store.add_server_trust_anchors(
webpki_roots::TLS_SERVER_ROOTS.0.iter().map(|ta| {
root_cert_store.add_trust_anchors(
webpki_roots::TLS_SERVER_ROOTS.iter().map(|ta| {
OwnedTrustAnchor::from_subject_spki_name_constraints(ta.subject, ta.spki, ta.name_constraints)
}),
);
Expand Down

0 comments on commit fc9b19c

Please sign in to comment.