From 966616b274d24c45b1f3a71ff35ddd502153b4a1 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 18 Sep 2001 05:19:55 +0000 Subject: [PATCH] Don't pass NULL hostname to ldap_pvt_tls_check_hostname, use "localhost" --- libraries/libldap/tls.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.39.5