Lines Matching defs:hostname
26 * Helper functions to perform basic hostname validation using OpenSSL.
56 * Tries to find a match for hostname in the certificate's Common Name field.
63 static HostnameValidationResult matches_common_name(const char *hostname, const X509 *server_cert) {
93 // Compare expected hostname with the CN
94 if (Curl_cert_hostcheck(common_name_str, hostname) == CURL_HOST_MATCH) {
104 * Tries to find a match for hostname in the certificate's Subject Alternative Name extension.
111 static HostnameValidationResult matches_subject_alternative_name(const char *hostname, const X509 *server_cert) {
137 else { // Compare expected hostname with the DNS name
138 if (Curl_cert_hostcheck(dns_name, hostname)
153 * Validates the server's identity by looking for the expected hostname in the
163 HostnameValidationResult validate_hostname(const char *hostname, const X509 *server_cert) {
166 if((hostname == NULL) || (server_cert == NULL))
170 result = matches_subject_alternative_name(hostname, server_cert);
173 result = matches_common_name(hostname, server_cert);