Lines Matching refs:hostname
27 * Helper functions to perform basic hostname validation using OpenSSL.
58 * Tries to find a match for hostname in the certificate's Common Name field.
65 static HostnameValidationResult matches_common_name(const char *hostname, const X509 *server_cert) {
95 // Compare expected hostname with the CN
96 if (Curl_cert_hostcheck(common_name_str, hostname) == CURL_HOST_MATCH) {
106 * Tries to find a match for hostname in the certificate's Subject Alternative Name extension.
113 static HostnameValidationResult matches_subject_alternative_name(const char *hostname, const X509 *server_cert) {
139 else { // Compare expected hostname with the DNS name
140 if (Curl_cert_hostcheck(dns_name, hostname)
155 * Validates the server's identity by looking for the expected hostname in the
165 HostnameValidationResult validate_hostname(const char *hostname, const X509 *server_cert) {
168 if((hostname == NULL) || (server_cert == NULL))
172 result = matches_subject_alternative_name(hostname, server_cert);
175 result = matches_common_name(hostname, server_cert);