Function wtransport::tls::build_native_cert_store

source ·
pub fn build_native_cert_store() -> RootCertStore
Expand description

Builds rustls::RootCertStore by using platform’s native certificate store.

This function works on a best-effort basis, attempting to load every possible root certificate found on the platform. It skips anchors that produce errors during loading. Therefore, it might produce an empty root store.

It’s important to note that this function can be expensive, as it might involve loading all root certificates from the filesystem platform. Therefore, it’s advisable to use it sporadically and judiciously.