From 18df386b433668ce330c0ad5e8403a7ae7dec853 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 30 Jan 2003 00:28:36 +0000 Subject: [PATCH] Fix ITS#2161, the check is meaningless anyway. --- libraries/libldap/tls.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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; + } } /* -- 2.39.5