# `AshHooks.Http.CertSan`
[🔗](https://github.com/baselabs/ash_hooks/blob/v3.3.0/lib/ash_hooks/http/cert_san.ex#L1)

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.

# `ip_san_match?`

```elixir
@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.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
