]> git.sur5r.net Git - openldap/commitdiff
Fix ITS#2161, the check is meaningless anyway.
authorHoward Chu <hyc@openldap.org>
Thu, 30 Jan 2003 00:28:36 +0000 (00:28 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 30 Jan 2003 00:28:36 +0000 (00:28 +0000)
libraries/libldap/tls.c

index ce9d4a0bc56882f87208b19dccfb56643e333505..d093739a6d8d17c6db7d0d251ae32f2bef8bd39d 100644 (file)
@@ -1393,9 +1393,11 @@ ldap_int_tls_start ( LDAP *ld, LDAPConn *conn, LDAPURLDesc *srv )
        /* 
         * compare host with name(s) in certificate
         */
-       ld->ld_errno = ldap_pvt_tls_check_hostname( ld, ssl, host );
-       if (ld->ld_errno != LDAP_SUCCESS) {
-               return ld->ld_errno;
+       if (tls_opt_require_cert != LDAP_OPT_X_TLS_NEVER) {
+               ld->ld_errno = ldap_pvt_tls_check_hostname( ld, ssl, host );
+               if (ld->ld_errno != LDAP_SUCCESS) {
+                       return ld->ld_errno;
+               }
        }
 
        /*