Skip to content

Commit

Permalink
chore(deps): update rustls and ureq
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Zak <[email protected]>
  • Loading branch information
rjzak authored and rvolosatovs committed Aug 25, 2023
1 parent f4b0ef2 commit 965157f
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 27 deletions.
52 changes: 40 additions & 12 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ cap-async-std = { version = "0.26.1", default-features = true, features = ["fs_u
clap = { version = "4.3.24", default-features = false, features = ["derive", "error-context", "help", "std", "usage", "wrap_help"] }
confargs = { version = "0.1.3", default-features = false }
futures = { version = "0.3.28", default-features = false }
futures-rustls = { version = "0.22.1", default-features = false }
futures-rustls = { version = "0.24.0", default-features = false }
headers = { version = "0.3.7", default-features = false }
http = { version = "0.2.9", default-features = false }
http-types = { version = "2.12.0", default-features = false }
Expand All @@ -49,7 +49,7 @@ once_cell = { version = "1.18.0", default-features = false }
openidconnect = { version = "2.5.1", default-features = false }
rand = { version = "0.8.5", default-features = false }
rsa = { version = "0.8.2", default-features = false }
rustls = { version = "0.20.8", default-features = false }
rustls = { version = "0.21.0", default-features = false }
rustls-pemfile = { version = "1.0.3", default-features = false }
semver = { version = "1.0.18", default-features = false }
serde = { version = "1.0.185", default-features = false }
Expand All @@ -61,7 +61,7 @@ tower = { version = "0.4.12", default-features = false }
tower-http = { version = "0.3.5", default-features = false }
tracing = { version = "0.1.37", default-features = false, features = ["release_max_level_debug"] }
tracing-subscriber = { version = "0.3.17", default-features = false, features = ["ansi", "env-filter", "std", "tracing-log", "json"] }
ureq = { version = "2.6.2", default-features = false }
ureq = { version = "2.7.1", default-features = false }
url = { version = "2.2.2", default-features = false }
uuid = { version = "1.4.1", default-features = false, features = ["v4"] }
walkdir = { version = "2.3.3", default-features = false }
Expand Down
18 changes: 8 additions & 10 deletions crates/client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,19 +208,17 @@ impl<S: Scope> ClientBuilder<S> {
roots
} else {
let mut root_store = RootCertStore::empty();
root_store.add_server_trust_anchors(webpki_roots::TLS_SERVER_ROOTS.0.iter().map(
|ta| {
OwnedTrustAnchor::from_subject_spki_name_constraints(
ta.subject,
ta.spki,
ta.name_constraints,
)
},
));
root_store.add_trust_anchors(webpki_roots::TLS_SERVER_ROOTS.0.iter().map(|ta| {
OwnedTrustAnchor::from_subject_spki_name_constraints(
ta.subject,
ta.spki,
ta.name_constraints,
)
}));
root_store
});
let tls = if let Some((cert, key)) = self.credentials {
tls.with_single_cert(cert, key)?
tls.with_client_auth_cert(cert, key)?
} else {
tls.with_no_client_auth()
};
Expand Down
3 changes: 2 additions & 1 deletion crates/server/src/auth/tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

use std::io::BufRead;
use std::ops::Deref;
use std::sync::Arc;

use anyhow::{anyhow, bail, Context};
use rustls::server::AllowAnyAnonymousOrAuthenticatedClient;
Expand Down Expand Up @@ -79,7 +80,7 @@ impl Config {

ServerConfig::builder()
.with_safe_defaults()
.with_client_cert_verifier(client_verifier)
.with_client_cert_verifier(Arc::new(client_verifier))
.with_single_cert(certs, key)
.context("invalid server certificate key")
.map(Self)
Expand Down
3 changes: 2 additions & 1 deletion crates/server/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// SPDX-License-Identifier: AGPL-3.0-only

use super::{handle, App, Store, TlsConfig};
use std::ops::Deref;

use anyhow::{anyhow, Context};
use async_std::fs::File;
Expand Down Expand Up @@ -116,7 +117,7 @@ impl<S: AsRef<Path>> Builder<S> {
)
.into_make_service(),
),
tls: TlsAcceptor::from(Arc::new(tls.into())),
tls: TlsAcceptor::from(Arc::new(tls.deref().clone())),
})
}
}

0 comments on commit 965157f

Please sign in to comment.