From 7a4b9e3c32bc0dc0de35acdb94a8156838bec705 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 18 Sep 2001 17:35:47 +0000 Subject: [PATCH] Minor cleanup --- libraries/libldap/tls.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/libldap/tls.c b/libraries/libldap/tls.c index ac7fc6a987..6c917d3009 100644 --- a/libraries/libldap/tls.c +++ b/libraries/libldap/tls.c @@ -1055,6 +1055,9 @@ ldap_int_tls_start ( LDAP *ld, LDAPConn *conn, LDAPURLDesc *srv ) host = conn->lconn_server->lud_host; } + /* avoid NULL host */ + if( host == NULL ) host = "localhost"; + (void) ldap_pvt_tls_init(); /* @@ -1069,11 +1072,8 @@ ldap_int_tls_start ( LDAP *ld, LDAPConn *conn, LDAPURLDesc *srv ) assert( ssl != NULL ); /* - * compare host with name(s) in certificate. avoid NULL host + * compare host with name(s) in certificate */ - - 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