@@ -16,9 +16,8 @@ use actix_utils::future::{ok, Ready};
16
16
use futures_core:: ready;
17
17
use rustls_pki_types_1:: ServerName ;
18
18
use 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 ,
22
21
} ;
23
22
use tokio_rustls_025 as tokio_rustls;
24
23
@@ -36,8 +35,8 @@ pub mod reexports {
36
35
///
37
36
/// See [`rustls_native_certs::load_native_certs()`] for more info on behavior and errors.
38
37
#[ 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 ( ) ;
41
40
42
41
for cert in rustls_native_certs_07:: load_native_certs ( ) ? {
43
42
root_certs. add ( cert) . unwrap ( ) ;
@@ -48,8 +47,8 @@ pub fn native_roots_cert_store() -> io::Result<RootCertStore> {
48
47
49
48
/// Returns standard root certificates from `webpki-roots` crate as a rustls certificate store.
50
49
#[ 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 ( ) ;
53
52
root_certs. extend ( webpki_roots_026:: TLS_SERVER_ROOTS . to_owned ( ) ) ;
54
53
root_certs
55
54
}
0 commit comments