diff --git a/.github/workflows/cont_integration.yml b/.github/workflows/cont_integration.yml index 3d2844f..5fe5477 100644 --- a/.github/workflows/cont_integration.yml +++ b/.github/workflows/cont_integration.yml @@ -33,6 +33,7 @@ jobs: run: | cargo update -p openssl --precise "0.10.78" cargo update -p openssl-sys --precise "0.9.114" + cargo update -p zeroize --precise "1.8.2" - name: Test run: cargo test --verbose --all-features @@ -72,6 +73,7 @@ jobs: run: | cargo update -p openssl --precise "0.10.78" cargo update -p openssl-sys --precise "0.9.114" + cargo update -p zeroize --precise "1.8.2" - name: Check features run: cargo check --verbose ${{ matrix.features }} diff --git a/README.md b/README.md index d543c15..b9f554e 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ To build with the MSRV you will need to pin dependencies by running: ``` bash cargo update -p openssl --precise "0.10.78" cargo update -p openssl-sys --precise "0.9.114" +cargo update -p zeroize --precise "1.8.2" ``` ## License diff --git a/src/raw_client.rs b/src/raw_client.rs index 0a7a3ff..e2a5b9c 100644 --- a/src/raw_client.rs +++ b/src/raw_client.rs @@ -462,20 +462,28 @@ impl RawClient { rustls::crypto::CryptoProvider::install_default( rustls::crypto::aws_lc_rs::default_provider(), ) - .map_err(|_| { - Error::CouldNotCreateConnection(rustls::Error::General( - "Failed to install CryptoProvider".to_string(), - )) + .or_else(|_| { + rustls::crypto::CryptoProvider::get_default() + .map(|_| ()) + .ok_or_else(|| { + Error::CouldNotCreateConnection(rustls::Error::General( + "Failed to install CryptoProvider".to_string(), + )) + }) })?; #[cfg(feature = "rustls-ring")] rustls::crypto::CryptoProvider::install_default( rustls::crypto::ring::default_provider(), ) - .map_err(|_| { - Error::CouldNotCreateConnection(rustls::Error::General( - "Failed to install CryptoProvider".to_string(), - )) + .or_else(|_| { + rustls::crypto::CryptoProvider::get_default() + .map(|_| ()) + .ok_or_else(|| { + Error::CouldNotCreateConnection(rustls::Error::General( + "Failed to install CryptoProvider".to_string(), + )) + }) })?; }