From: Howard Chu Date: Tue, 18 Sep 2001 05:19:55 +0000 (+0000) Subject: Don't pass NULL hostname to ldap_pvt_tls_check_hostname, use "localhost" X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1094 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=966616b274d24c45b1f3a71ff35ddd502153b4a1;p=openldap Don't pass NULL hostname to ldap_pvt_tls_check_hostname, use "localhost" --- diff --git a/libraries/libldap/tls.c b/libraries/libldap/tls.c index f31c97973c..97db901a5e 100644 --- a/libraries/libldap/tls.c +++ b/libraries/libldap/tls.c @@ -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;