@@ -16,9 +16,8 @@ use actix_utils::future::{ok, Ready};
1616use futures_core:: ready;
1717use rustls_pki_types_1:: ServerName ;
1818use tokio_rustls:: {
19- client:: TlsStream as AsyncTlsStream ,
20- rustls:: { ClientConfig , RootCertStore } ,
21- Connect as RustlsConnect , TlsConnector as RustlsTlsConnector ,
19+ client:: TlsStream as AsyncTlsStream , rustls:: ClientConfig , Connect as RustlsConnect ,
20+ TlsConnector as RustlsTlsConnector ,
2221} ;
2322use tokio_rustls_025 as tokio_rustls;
2423
@@ -36,8 +35,8 @@ pub mod reexports {
3635///
3736/// See [`rustls_native_certs::load_native_certs()`] for more info on behavior and errors.
3837#[ cfg( feature = "rustls-0_22-native-roots" ) ]
39- pub fn native_roots_cert_store ( ) -> io:: Result < RootCertStore > {
40- let mut root_certs = RootCertStore :: empty ( ) ;
38+ pub fn native_roots_cert_store ( ) -> io:: Result < tokio_rustls :: rustls :: RootCertStore > {
39+ let mut root_certs = tokio_rustls :: rustls :: RootCertStore :: empty ( ) ;
4140
4241 for cert in rustls_native_certs_07:: load_native_certs ( ) ? {
4342 root_certs. add ( cert) . unwrap ( ) ;
@@ -48,8 +47,8 @@ pub fn native_roots_cert_store() -> io::Result<RootCertStore> {
4847
4948/// Returns standard root certificates from `webpki-roots` crate as a rustls certificate store.
5049#[ cfg( feature = "rustls-0_22-webpki-roots" ) ]
51- pub fn webpki_roots_cert_store ( ) -> RootCertStore {
52- let mut root_certs = RootCertStore :: empty ( ) ;
50+ pub fn webpki_roots_cert_store ( ) -> tokio_rustls :: rustls :: RootCertStore {
51+ let mut root_certs = tokio_rustls :: rustls :: RootCertStore :: empty ( ) ;
5352 root_certs. extend ( webpki_roots_026:: TLS_SERVER_ROOTS . to_owned ( ) ) ;
5453 root_certs
5554}
0 commit comments