Function load_native_certs
pub fn load_native_certs() -> CertificateResultAvailable on crate features
crypto and native-certs only.Expand description
Load root certificates found in the platform’s native certificate store.
§Environment Variables
| Env. Var. | Description |
|---|---|
| SSL_CERT_FILE | File containing an arbitrary number of certificates in PEM format. |
| SSL_CERT_DIR | :/; separated list of directories containing certificate files. |
If either (or both) are set, certificates are only loaded from the locations specified via environment variables and not the platform-native certificate store.
§Caveats
This function can be expensive: on some platforms it involves loading and
parsing a ~300KB disk file, or querying the OS keychain. Prefer
shared_native_trust_anchors which caches the result.