]> git.sur5r.net Git - openldap/commitdiff
ITS#5789 GNUtls - allow CN matches against IP addresses
authorHoward Chu <hyc@openldap.org>
Tue, 4 Nov 2008 11:21:52 +0000 (11:21 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 4 Nov 2008 11:21:52 +0000 (11:21 +0000)
libraries/libldap/tls.c

index b042aec9f4f9f4dc5d63f060a881b121f1e7a5ff..9b008ddb9ceda75440e823051cde6de4887433e0 100644 (file)
@@ -1894,6 +1894,7 @@ ldap_pvt_tls_check_hostname( LDAP *ld, void *s, const char *name_in )
 
                } else {
                        ret = LDAP_LOCAL_ERROR;
+                       if ( !len1 ) len1 = strlen( name );
                        if ( len1 == altnamesize && strncasecmp(name, altname, altnamesize) == 0 ) {
                                ret = LDAP_SUCCESS;