Lines Matching defs: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) {
94 // Compare expected hostname with the CN
95 if (Curl_cert_hostcheck(common_name_str, hostname) == CURL_HOST_MATCH) {
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 *server_cert) {
138 else { // Compare expected hostname with the DNS name
139 if (Curl_cert_hostcheck(dns_name, hostname)
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) {
167 if((hostname == NULL) || (server_cert == NULL))
171 result = matches_subject_alternative_name(hostname, server_cert);
174 result = matches_common_name(hostname, server_cert);