]> git.sur5r.net Git - openldap/commitdiff
Don't pass NULL hostname to ldap_pvt_tls_check_hostname, use "localhost"
authorHoward Chu <hyc@openldap.org>
Tue, 18 Sep 2001 05:19:55 +0000 (05:19 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 18 Sep 2001 05:19:55 +0000 (05:19 +0000)
libraries/libldap/tls.c

index f31c97973c5958fb9fb7156b98cb400618e8213f..97db901a5e94bd0844e36eb5648674bdc73cb087 100644 (file)
@@ -1069,9 +1069,11 @@ ldap_int_tls_start ( LDAP *ld, LDAPConn *conn, LDAPURLDesc *srv )
        assert( ssl != NULL );
 
        /* 
-        * compare host with name(s) in certificate 
+        * compare host with name(s) in certificate. avoid NULL host
         */
 
+       if( host == NULL )
+               host = "localhost";
        ld->ld_errno = ldap_pvt_tls_check_hostname( ssl, host );
        if (ld->ld_errno != LDAP_SUCCESS) {
                return ld->ld_errno;