pub fn validate_for_domain(
domain: &str,
cert_pem: &[u8],
key_pem: &[u8],
) -> ProxyResult<CertificateFacts>Expand description
Check a PEM certificate chain and key, and report what they cover.
Four things, each of which has to hold before this certificate can serve a domain:
- The chain and the key parse.
- The key belongs to the certificate. Delegated to rustls, which compares the public keys — this is the check whose absence produces a listener that fails every handshake with no clue why.
- The leaf has not expired.
- The leaf covers
domain, wildcards included.