Trait hyper_rustls::ConfigBuilderExt
source · pub trait ConfigBuilderExt {
// Required methods
fn with_platform_verifier(
self,
) -> ConfigBuilder<ClientConfig, WantsClientCert>;
fn with_native_roots(
self,
) -> Result<ConfigBuilder<ClientConfig, WantsClientCert>, Error>;
fn with_webpki_roots(self) -> ConfigBuilder<ClientConfig, WantsClientCert>;
}
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_platform_verifier(self) -> ConfigBuilder<ClientConfig, WantsClientCert>
Available on crate feature rustls-platform-verifier
only.
fn with_platform_verifier(self) -> ConfigBuilder<ClientConfig, WantsClientCert>
rustls-platform-verifier
only.Use the platform’s native verifier to verify server certificates.
See the documentation for rustls-platform-verifier for more details.
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
.
sourcefn with_webpki_roots(self) -> ConfigBuilder<ClientConfig, WantsClientCert>
Available on crate feature webpki-roots
only.
fn with_webpki_roots(self) -> ConfigBuilder<ClientConfig, WantsClientCert>
webpki-roots
only.This configures the webpki roots, which are Mozilla’s set of trusted roots as packaged by webpki-roots.
Implementations on Foreign Types§
source§impl ConfigBuilderExt for ConfigBuilder<ClientConfig, WantsVerifier>
impl ConfigBuilderExt for ConfigBuilder<ClientConfig, WantsVerifier>
source§fn with_platform_verifier(self) -> ConfigBuilder<ClientConfig, WantsClientCert>
fn with_platform_verifier(self) -> ConfigBuilder<ClientConfig, WantsClientCert>
Available on crate feature
rustls-platform-verifier
only.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.source§fn with_webpki_roots(self) -> ConfigBuilder<ClientConfig, WantsClientCert>
fn with_webpki_roots(self) -> ConfigBuilder<ClientConfig, WantsClientCert>
Available on crate feature
webpki-roots
only.