Skip to content

Commit

Permalink
conditionally install aws-lc-rs (#1617)
Browse files Browse the repository at this point in the history
conditionally install aws

Signed-off-by: goenning <[email protected]>
Co-authored-by: Eirik A <[email protected]>
  • Loading branch information
goenning and clux authored Oct 25, 2024
1 parent ecbdafc commit 140c9bd
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(all(feature = "rustls-tls", not(feature = "webpki-roots")))]
let https = hyper_rustls::HttpsConnectorBuilder::new()
Expand Down

0 comments on commit 140c9bd

Please sign in to comment.