Fix ITS#2161, the check is meaningless anyway.

This commit is contained in:
Howard Chu 2003-01-30 00:28:36 +00:00
parent 13c48d1f76
commit 18df386b43

View 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;
}
}
/*