pub fn add_tls(
builder: ClientBuilder,
ca_bytes: &[u8],
cert_bytes: Option<Vec<u8>>,
key_bytes: Option<Vec<u8>>,
) -> (ClientBuilder, bool)Expand description
Configure TLS on a reqwest::ClientBuilder by adding a root CA,
and optionally a client identity (cert + key) for mutual TLS.
ca_bytesmust be a PEM-encoded CA certificate; if it cannot be parsed, this returns(builder, false)and leaves the builder unchanged.- If both
cert_bytesandkey_bytesare provided, they are concatenated and parsed as a PEM identity. Identity parse failures are non-fatal: the root CA remains installed and the function still returnstrue.
Returns (updated_builder, ca_installed).