Skip to content

Commit

Permalink
conditionally install aws
Browse files Browse the repository at this point in the history
Signed-off-by: goenning <[email protected]>
  • Loading branch information
goenning committed Oct 25, 2024
1 parent acd2d8e commit 2234139
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions kube-client/src/client/auth/oidc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,13 @@ impl Refresher {
let client_secret = get_field(Self::CONFIG_CLIENT_SECRET)?.into();

#[cfg(all(feature = "rustls-tls", feature = "aws-lc-rs"))]
rustls::crypto::aws_lc_rs::default_provider()
.install_default()
.unwrap();
{
if rustls::crypto::CryptoProvider::get_default().is_none() {
// the only error here is if it's been initialized in between: we can ignore it
// since our semantic is only to set the default value if it does not exist.
let _ = rustls::crypto::aws_lc_rs::default_provider().install_default();
}
}

#[cfg(feature = "rustls-tls")]
let https = hyper_rustls::HttpsConnectorBuilder::new()
Expand Down

0 comments on commit 2234139

Please sign in to comment.