Skip to main content

common_name_matches

Function common_name_matches 

Source
fn common_name_matches(cert: &Certificate, server_name: &ServerName<'_>) -> bool
Expand description

Returns whether server_name is a DNS name equal, ignoring ASCII case, to any subject common name of cert, and cert has no DNS or IP subjectAltName.

This is stricter than OpenSSL’s fallback, which also applies when only IP subjectAltNames are present, matches wildcard common names, and decodes string types other than UTF8String, PrintableString and IA5String.