Movatterモバイル変換


[0]ホーム

URL:


Docs.rs

Craterustls_native_certs

Source
Expand description

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

It provides a single functionload_native_certs(), which returns acollection of certificates found by reading the platform-nativecertificate store.

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

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

letmutroots = rustls::RootCertStore::empty();forcertinrustls_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.

[8]ページ先頭

©2009-2025 Movatter.jp