Skip to main content

Module tls

Module tls 

Source
Expand description

TLS connector via rustls.

When the tls-rustls feature is enabled, this module provides HTTPS support using hyper_rustls with Mozilla root certificates. No OpenSSL system dependency is required.

§Custom CA certificates

For enterprise/internal PKI, use tls_config_with_extra_roots to create a rustls::ClientConfig with additional trust anchors, then pass it to the client builder.

Functions§

build_https_client_with_config
Builds an HTTPS-capable hyper client using a custom TLS configuration and the default connection timeout.
build_https_client_with_connect_timeout
Builds an HTTPS-capable hyper client with a custom TLS configuration and connection timeout applied to the underlying TCP connector.
default_tls_config
Builds a default ClientConfig with Mozilla root certificates.
tls_config_with_extra_roots
Builds a ClientConfig with extra CA certificates added to the Mozilla root store.

Type Aliases§

HttpsClient
Type alias for the HTTPS-capable hyper client.