AshHooks.Http.CertSan (AshHooks v3.3.0)

Copy Markdown View Source

Checks that an HTTPS certificate names the destination's literal IP address in an IP subject alternative name. Certificate-chain validation alone does not establish that match.

Summary

Functions

Checks DER-encoded certificate bytes for an IP subject alternative name matching an IPv4 four-tuple or IPv6 eight-tuple. Takes no options. Returns true for an exact match, or false for absent or mismatched IP names and malformed DER or SAN data. Does not validate the certificate chain.

Functions

ip_san_match?(der, address)

@spec ip_san_match?(binary(), :inet.ip_address()) :: boolean()

Checks DER-encoded certificate bytes for an IP subject alternative name matching an IPv4 four-tuple or IPv6 eight-tuple. Takes no options. Returns true for an exact match, or false for absent or mismatched IP names and malformed DER or SAN data. Does not validate the certificate chain.