__tls and not (WebAssembly and (target_os=unknown or bare-metal)) only.Expand description
TLS configuration and types
A Client will use transport layer security (TLS) by default to connect to
HTTPS destinations.
§Backends
reqwest-boring is a fork of reqwest with BoringSSL as its default TLS
layer. An optional system-native backend is also available through Cargo
features.
§default-tls
The default-tls feature enables BoringSSL through the boring and
tokio-boring crates. HTTP/3 uses Quiche with the same BoringSSL build.
Since Cargo features are additive, other crates in your dependency tree can
cause the default backend to be enabled. If you wish to ensure your
Client uses a specific backend, call the appropriate builder methods
(such as tls_backend_rustls()).
§native-tls
This backend uses the native-tls crate. That will try to use the system TLS on Windows and Mac, and OpenSSL on Linux targets.
Enabling the feature explicitly allows for native-tls-specific
configuration options.
§boring, rustls, rustls-no-provider
These features select BoringSSL through the boring crate. The legacy
rustls feature and builder names are retained for source compatibility.
No Rustls crypto provider is needed. Preconfigured TLS accepts a
boring::ssl::SslConnector instead of Rustls configuration objects (or a
native-tls connector when that backend is enabled). HTTP/3 is configured
through the standard builder methods.
Structs§
- Certificate
- Represents a server X509 certificate.
- Certificate
Revocation List __rustls - Represents a X509 certificate revocation list.
- Identity
- Represents a private key and X509 cert as a client certificate.
- TlsInfo
- Hyper extension carrying extra TLS layer information.
Made available to clients on responses when
tls_infois set. - Version
- A TLS protocol version.