File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,18 +97,23 @@ mod https {
9797 /// happens here. On non-unix platforms, ddcommon uses `ring` instead, which handles this
9898 /// at rustls initialization. TODO: Move to the more ergonomic LazyLock when MSRV is 1.80
9999 /// In fips mode we expect someone to have done this already.
100+ #[ cfg( not( feature = "fips" ) ) ]
100101 fn ensure_crypto_provider_initialized ( ) {
101102 use std:: sync:: OnceLock ;
102103 static INIT_CRYPTO_PROVIDER : OnceLock < ( ) > = OnceLock :: new ( ) ;
103104 INIT_CRYPTO_PROVIDER . get_or_init ( || {
104- #[ cfg( all ( unix, not ( feature = "fips" ) ) ) ]
105+ #[ cfg( unix) ]
105106 #[ allow( clippy:: expect_used) ]
106107 rustls:: crypto:: aws_lc_rs:: default_provider ( )
107108 . install_default ( )
108109 . expect ( "Failed to install default CryptoProvider" ) ;
109110 } ) ;
110111 }
111112
113+ // This this actually needs to be done by the user somewhere in their own main.
114+ #[ cfg( feature = "fips" ) ]
115+ fn ensure_crypto_provider_initialized ( ) { }
116+
112117 #[ cfg( feature = "use_webpki_roots" ) ]
113118 pub ( super ) fn build_https_connector_with_webpki_roots ( ) -> anyhow:: Result <
114119 hyper_rustls:: HttpsConnector < hyper_util:: client:: legacy:: connect:: HttpConnector > ,
You can’t perform that action at this time.
0 commit comments