pub trait ConfigBuilderExt {
// Required method
fn with_native_roots(
self,
) -> Result<ConfigBuilder<ClientConfig, WantsClientCert>, Error>;
}
Expand description
Methods for configuring roots
This adds methods (gated by crate features) for easily configuring TLS server roots a rustls ClientConfig will trust.
Required Methods§
Sourcefn with_native_roots(
self,
) -> Result<ConfigBuilder<ClientConfig, WantsClientCert>, Error>
Available on crate feature rustls-native-certs
only.
fn with_native_roots( self, ) -> Result<ConfigBuilder<ClientConfig, WantsClientCert>, Error>
rustls-native-certs
only.This configures the platform’s trusted certs, as implemented by rustls-native-certs
This will return an error if no valid certs were found. In that case,
it’s recommended to use with_webpki_roots
.
Implementations on Foreign Types§
Source§impl ConfigBuilderExt for ConfigBuilder<ClientConfig, WantsVerifier>
impl ConfigBuilderExt for ConfigBuilder<ClientConfig, WantsVerifier>
Source§fn with_native_roots(
self,
) -> Result<ConfigBuilder<ClientConfig, WantsClientCert>, Error>
fn with_native_roots( self, ) -> Result<ConfigBuilder<ClientConfig, WantsClientCert>, Error>
Available on crate feature
rustls-native-certs
only.