mirror of https://github.com/fafhrd91/actix-net
Compare commits
2 Commits
6aceb939ca
...
7587b32722
| Author | SHA1 | Date |
|---|---|---|
|
|
7587b32722 | |
|
|
7576a68cd2 |
|
|
@ -35,12 +35,17 @@ pub mod reexports {
|
|||
///
|
||||
/// See [`rustls_native_certs::load_native_certs()`] for more info on behavior and errors.
|
||||
///
|
||||
/// [`rustls_native_certs::load_native_certs()`]: rustls_native_certs_07::load_native_certs()
|
||||
/// [`rustls_native_certs::load_native_certs()`]: rustls_native_certs_08::load_native_certs()
|
||||
#[cfg(feature = "rustls-0_22-native-roots")]
|
||||
pub fn native_roots_cert_store() -> io::Result<tokio_rustls::rustls::RootCertStore> {
|
||||
let mut root_certs = tokio_rustls::rustls::RootCertStore::empty();
|
||||
|
||||
for cert in rustls_native_certs_07::load_native_certs()? {
|
||||
let certs = rustls_native_certs_08::load_native_certs();
|
||||
if let Some(err) = certs.errors.into_iter().next() {
|
||||
return Err(io::Error::other(err));
|
||||
}
|
||||
|
||||
for cert in certs.certs {
|
||||
root_certs.add(cert).unwrap();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ pub mod reexports {
|
|||
///
|
||||
/// See [`rustls_native_certs::load_native_certs()`] for more info on behavior and errors.
|
||||
///
|
||||
/// [`rustls_native_certs::load_native_certs()`]: rustls_native_certs_07::load_native_certs()
|
||||
/// [`rustls_native_certs::load_native_certs()`]: rustls_native_certs_08::load_native_certs()
|
||||
#[cfg(feature = "rustls-0_23-native-roots")]
|
||||
pub fn native_roots_cert_store() -> io::Result<tokio_rustls::rustls::RootCertStore> {
|
||||
let mut root_certs = tokio_rustls::rustls::RootCertStore::empty();
|
||||
|
|
|
|||
Loading…
Reference in New Issue