Lines Matching full:hostname
26 * Helper functions to perform basic hostname validation using OpenSSL.
57 * Tries to find a match for hostname in the certificate's Common Name field.
64 static HostnameValidationResult matches_common_name(const char *hostname, const X509 *server_cert) { in matches_common_name() argument
94 // Compare expected hostname with the CN in matches_common_name()
95 if (Curl_cert_hostcheck(common_name_str, hostname) == CURL_HOST_MATCH) { in matches_common_name()
105 * Tries to find a match for hostname in the certificate's Subject Alternative Name extension.
112 static HostnameValidationResult matches_subject_alternative_name(const char *hostname, const X509 *… in matches_subject_alternative_name() argument
138 else { // Compare expected hostname with the DNS name in matches_subject_alternative_name()
139 if (Curl_cert_hostcheck(dns_name, hostname) in matches_subject_alternative_name()
154 * Validates the server's identity by looking for the expected hostname in the
164 HostnameValidationResult validate_hostname(const char *hostname, const X509 *server_cert) { in validate_hostname() argument
167 if((hostname == NULL) || (server_cert == NULL)) in validate_hostname()
171 result = matches_subject_alternative_name(hostname, server_cert); in validate_hostname()
174 result = matches_common_name(hostname, server_cert); in validate_hostname()