X.509 Certificate Parsing (DER format, read-only)
Parses the minimum fields needed for TLS: subject, issuer, validity, public key, SAN.
Freestanding-safe; no dynamic allocation.
| x509_parse | Parses a DER certificate. 0 on success, X509_ERR_* otherwise. |
| x509_verify_signed_by | 1 if the signature on cert (der/c) verifies with issuer's public key
(issuer_der/issuer); 0 otherwise (bad signature, unsupported algorithm,
SHA-1, or an RSA key under 1024 bits). |
| x509_issued_by | 1 if cert's issuer name is byte-for-byte issuer's subject name. |
| x509_match_host | 1 if 'host' (a DNS name, or an IPv4/IPv6 literal) matches the
certificate: DNS names against dNSName SANs (case-insensitive, a '*'
leftmost label matching exactly one label, never in IP literals or a
public-suffix-like two-label pattern), IP literals against iPAddress
SANs; the subject CN is consulted only when the certificate has no DNS
or IP SAN at all. |