Minor cleanup

This commit is contained in:
Kurt Zeilenga 2001-09-18 17:35:47 +00:00
parent 384cbde4f5
commit 7a4b9e3c32

View file

@ -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;