fix: CryptoProvider::get_default returned None
This commit is contained in:
parent
39c31d9651
commit
1395bb04ff
1 changed files with 5 additions and 1 deletions
|
@ -9,7 +9,11 @@ pub struct AllowAllCertVerifier(std::sync::Arc<CryptoProvider>);
|
|||
|
||||
impl AllowAllCertVerifier {
|
||||
pub fn yes_i_know_what_i_am_doing() -> Self {
|
||||
AllowAllCertVerifier(CryptoProvider::get_default().unwrap().clone())
|
||||
AllowAllCertVerifier(
|
||||
CryptoProvider::get_default()
|
||||
.map(|c| c.clone())
|
||||
.unwrap_or_else(|| std::sync::Arc::new(rustls::crypto::ring::default_provider())),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue