File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121// Enable documentation for all features on docs.rs
2222#![ cfg_attr( docsrs, feature( doc_cfg, doc_auto_cfg) ) ]
2323
24+ use std:: env;
25+ use std:: ffi:: OsStr ;
26+ use std:: fs:: { self , File } ;
27+ use std:: io:: BufReader ;
28+ use std:: io:: { Error , ErrorKind } ;
29+ use std:: path:: { Path , PathBuf } ;
30+
31+ use pki_types:: CertificateDer ;
32+
2433#[ cfg( all( unix, not( target_os = "macos" ) ) ) ]
2534mod unix;
2635#[ cfg( all( unix, not( target_os = "macos" ) ) ) ]
@@ -36,15 +45,6 @@ mod macos;
3645#[ cfg( target_os = "macos" ) ]
3746use macos as platform;
3847
39- use std:: env;
40- use std:: ffi:: OsStr ;
41- use std:: fs:: { self , File } ;
42- use std:: io:: BufReader ;
43- use std:: io:: { Error , ErrorKind } ;
44- use std:: path:: { Path , PathBuf } ;
45-
46- use pki_types:: CertificateDer ;
47-
4848/// Load root certificates found in the platform's native certificate store.
4949///
5050/// ## Environment Variables
Original file line number Diff line number Diff line change 1- use pki_types:: CertificateDer ;
2- use security_framework:: trust_settings:: { Domain , TrustSettings , TrustSettingsForCertificate } ;
3-
41use std:: collections:: HashMap ;
52use std:: io:: { Error , ErrorKind } ;
63
4+ use pki_types:: CertificateDer ;
5+ use security_framework:: trust_settings:: { Domain , TrustSettings , TrustSettingsForCertificate } ;
6+
77pub fn load_native_certs ( ) -> Result < Vec < CertificateDer < ' static > > , Error > {
88 // The various domains are designed to interact like this:
99 //
Original file line number Diff line number Diff line change 1- use crate :: CertPaths ;
1+ use std :: io :: Error ;
22
33use pki_types:: CertificateDer ;
44
5- use std :: io :: Error ;
5+ use crate :: CertPaths ;
66
77pub fn load_native_certs ( ) -> Result < Vec < CertificateDer < ' static > > , Error > {
88 let likely_locations = openssl_probe:: probe ( ) ;
Original file line number Diff line number Diff line change 1- use pki_types:: CertificateDer ;
2-
31use std:: io:: Error ;
42
3+ use pki_types:: CertificateDer ;
4+
55static PKIX_SERVER_AUTH : & str = "1.3.6.1.5.5.7.3.1" ;
66
77fn usable_for_rustls ( uses : schannel:: cert_context:: ValidUses ) -> bool {
You can’t perform that action at this time.
0 commit comments