You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//! * A higher level function [load_native_certs](fn.build_native_certs.html)
//! which returns a `rustls::RootCertStore` pre-filled from the native
//! certificate store. It is only available if the `rustls` feature is
//! enabled.
//! * A lower level function [build_native_certs](fn.build_native_certs.html)
//! that lets callers pass their own certificate parsing logic. It is
//! available to all users.
build_native_certs is gone, and load_native_certs doesn't return a RootCertStore any more.
Consider replacing this with the snippet in the example:
let mut roots = rustls::RootCertStore::empty();
for cert in rustls_native_certs::load_native_certs().expect("could not load platform certs") {
roots
.add(&rustls::Certificate(cert.0))
.unwrap();
}
It was not very obvious to me how to upgrade this crate without digging into the examples to figure out how to turn a vec of certificates into a RootCertStore.
The text was updated successfully, but these errors were encountered:
Oops, thanks for the bug report. Do the changes proposed in #38 make things clearer? If you have any suggestions about how to further improve things, that would be much appreciated.
See:
rustls-native-certs/src/lib.rs
Lines 4 to 11 in f5b6e5b
build_native_certs
is gone, andload_native_certs
doesn't return aRootCertStore
any more.Consider replacing this with the snippet in the example:
It was not very obvious to me how to upgrade this crate without digging into the examples to figure out how to turn a vec of certificates into a
RootCertStore
.The text was updated successfully, but these errors were encountered: