From: Howard Chu Date: Thu, 30 Jan 2003 00:28:36 +0000 (+0000) Subject: Fix ITS#2161, the check is meaningless anyway. X-Git-Tag: NO_SLAP_OP_BLOCKS~474 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=18df386b433668ce330c0ad5e8403a7ae7dec853;p=openldap Fix ITS#2161, the check is meaningless anyway. --- diff --git a/libraries/libldap/tls.c b/libraries/libldap/tls.c index ce9d4a0bc5..d093739a6d 100644 --- a/libraries/libldap/tls.c +++ b/libraries/libldap/tls.c @@ -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; + } } /*