pub enum TlsConfig {
Verified,
Ca(Vec<u8>),
Insecure,
}Expand description
TLS verification mode for the connection to the Mapepire daemon.
Mapepire is always TLS — there is no plaintext path. This enum only chooses how the certificate is validated.
The variants exist at the type level in v0.1. Their runtime semantics
land with the transport layer in v0.2 — the active TLS backend is
selected at compile time via the rustls-tls (default) and
native-tls Cargo features.
Variants§
Verified
Verify the server certificate against system / webpki roots (default).
In v0.2 this requires the rustls-tls or native-tls feature; v0.1
only declares the type.
Ca(Vec<u8>)
Pin a specific CA certificate (DER-encoded bytes).
In v0.2, use this with the bytes returned by
DaemonServer::fetch_certificate to bootstrap trust on a self-signed
daemon. v0.1 only declares the variant.
Insecure
Skip server-cert verification entirely. Available only when the crate
is built with the insecure-tls feature (the runtime gate lands with
the transport layer in v0.2).
Never use this in production.