]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
gnutls_x509_crt_check_hostname() will never compare against IPaddress.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Thu, 21 Apr 2011 16:51:56 +0000 (18:51 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Thu, 21 Apr 2011 16:51:56 +0000 (18:51 +0200)
(previous comparison was flawed)

lib/x509/rfc2818_hostname.c

index 676be348375ac6046785dcd2564e1dc62cf62810..46606fd494b03ce375a91c8e83afc4c6f88f7d86 100644 (file)
@@ -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)