|
|
@ -104,11 +104,13 @@ mod encryption { |
|
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "rustls-tls-native-roots")] |
|
|
|
#[cfg(feature = "rustls-tls-native-roots")] |
|
|
|
{ |
|
|
|
{ |
|
|
|
for cert in rustls_native_certs::load_native_certs()? { |
|
|
|
let native_certs = rustls_native_certs::load_native_certs()?; |
|
|
|
root_store |
|
|
|
let der_certs: Vec<Vec<u8>> = |
|
|
|
.add(&rustls::Certificate(cert.0)) |
|
|
|
native_certs.into_iter().map(|cert| cert.0).collect(); |
|
|
|
.map_err(TlsError::Rustls)?; |
|
|
|
let total_number = der_certs.len(); |
|
|
|
} |
|
|
|
let (number_added, number_ignored) = |
|
|
|
|
|
|
|
root_store.add_parsable_certificates(&der_certs); |
|
|
|
|
|
|
|
log::debug!("Added {number_added}/{total_number} native root certificates (ignored {number_ignored})"); |
|
|
|
} |
|
|
|
} |
|
|
|
#[cfg(feature = "rustls-tls-webpki-roots")] |
|
|
|
#[cfg(feature = "rustls-tls-webpki-roots")] |
|
|
|
{ |
|
|
|
{ |
|
|
|