Crate rustls_native_certs

Source
Expand description

rustls-native-certs allows rustls to use the platform’s native certificate store when operating as a TLS client.

It provides a single function load_native_certs(), which returns a collection of certificates found by reading the platform-native certificate store.

If the SSL_CERT_FILE environment variable is set, certificates (in PEM format) are read from that file instead.

If you want to load these certificates into a rustls::RootCertStore, you’ll likely want to do something like this:

let mut roots = rustls::RootCertStore::empty();
for cert in rustls_native_certs::load_native_certs().expect("could not load platform certs") {
    roots.add(cert).unwrap();
}

Structs§

CertificateResult
Results from trying to load certificates from the platform’s native store.
Error

Enums§

ErrorKind

Functions§

load_native_certs
Load root certificates found in the platform’s native certificate store.
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy