From: Nikos Mavrogiannopoulos Date: Thu, 21 Apr 2011 16:51:56 +0000 (+0200) Subject: gnutls_x509_crt_check_hostname() will never compare against IPaddress. X-Git-Tag: gnutls_2_99_1~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bd6b213e7f1d5ab9c621ee4ee95caef2c242d33c;p=thirdparty%2Fgnutls.git gnutls_x509_crt_check_hostname() will never compare against IPaddress. (previous comparison was flawed) --- diff --git a/lib/x509/rfc2818_hostname.c b/lib/x509/rfc2818_hostname.c index 676be34837..46606fd494 100644 --- a/lib/x509/rfc2818_hostname.c +++ b/lib/x509/rfc2818_hostname.c @@ -80,16 +80,6 @@ gnutls_x509_crt_check_hostname (gnutls_x509_crt_t cert, const char *hostname) return 1; } } - else if (ret == GNUTLS_SAN_IPADDRESS) - { - found_dnsname = 1; /* RFC 2818 is unclear whether the CN - should be compared for IP addresses - too, but we won't do it. */ - if (_gnutls_hostname_compare (dnsname, dnsnamesize, hostname)) - { - return 1; - } - } } if (!found_dnsname)