std :: crypto::x509
Function std::x509_match_host
int x509_match_host([]const unsigned char der, const &X509Parsed c, const &char 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.