pub fn try_tls_acceptor(enforce_client_tls: bool) -> Option<TlsAcceptor>Expand description
Try to build a TlsAcceptor for an
HTTP server by probing for available TLS certificates.
Detection order:
- OSS / explicit config —
HYPERACTOR_TLS_CERT,HYPERACTOR_TLS_KEY, andHYPERACTOR_TLS_CA(read viahyperactor_config). - Meta default paths —
/var/facebook/x509_identities/server.pemand/var/facebook/rootcanal/ca.pem. These are present on devservers and in MAST / Tupperware containers. - None — no usable certificates found; caller should fall back to plain HTTP.
When enforce_client_tls is true, the returned acceptor
requires clients to present a valid certificate signed by the
configured CA (mutual TLS via WebPkiClientVerifier). When
false, the acceptor authenticates itself but does not demand
client certificates.