mirror of https://github.com/fafhrd91/actix-net
Compare commits
No commits in common. "7587b327223f7e503d900be9e5d71ec60b94d6da" and "6aceb939cac1af3f52fdd59e1b40fd8fcc222d83" have entirely different histories.
7587b32722
...
6aceb939ca
|
|
@ -35,17 +35,12 @@ pub mod reexports {
|
||||||
///
|
///
|
||||||
/// See [`rustls_native_certs::load_native_certs()`] for more info on behavior and errors.
|
/// See [`rustls_native_certs::load_native_certs()`] for more info on behavior and errors.
|
||||||
///
|
///
|
||||||
/// [`rustls_native_certs::load_native_certs()`]: rustls_native_certs_08::load_native_certs()
|
/// [`rustls_native_certs::load_native_certs()`]: rustls_native_certs_07::load_native_certs()
|
||||||
#[cfg(feature = "rustls-0_22-native-roots")]
|
#[cfg(feature = "rustls-0_22-native-roots")]
|
||||||
pub fn native_roots_cert_store() -> io::Result<tokio_rustls::rustls::RootCertStore> {
|
pub fn native_roots_cert_store() -> io::Result<tokio_rustls::rustls::RootCertStore> {
|
||||||
let mut root_certs = tokio_rustls::rustls::RootCertStore::empty();
|
let mut root_certs = tokio_rustls::rustls::RootCertStore::empty();
|
||||||
|
|
||||||
let certs = rustls_native_certs_08::load_native_certs();
|
for cert in rustls_native_certs_07::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();
|
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.
|
/// See [`rustls_native_certs::load_native_certs()`] for more info on behavior and errors.
|
||||||
///
|
///
|
||||||
/// [`rustls_native_certs::load_native_certs()`]: rustls_native_certs_08::load_native_certs()
|
/// [`rustls_native_certs::load_native_certs()`]: rustls_native_certs_07::load_native_certs()
|
||||||
#[cfg(feature = "rustls-0_23-native-roots")]
|
#[cfg(feature = "rustls-0_23-native-roots")]
|
||||||
pub fn native_roots_cert_store() -> io::Result<tokio_rustls::rustls::RootCertStore> {
|
pub fn native_roots_cert_store() -> io::Result<tokio_rustls::rustls::RootCertStore> {
|
||||||
let mut root_certs = tokio_rustls::rustls::RootCertStore::empty();
|
let mut root_certs = tokio_rustls::rustls::RootCertStore::empty();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue