mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-02-05 13:40:08 +08:00
essentially address 3791 with a reworked patch
This commit is contained in:
parent
ad62d9da1b
commit
b3f366e0ba
@ -831,10 +831,14 @@ int
|
||||
ldap_tls_inplace( LDAP *ld )
|
||||
{
|
||||
Sockbuf *sb = NULL;
|
||||
int rc;
|
||||
|
||||
rc = ldap_get_option( ld, LDAP_OPT_SOCKBUF, (void *)&sb );
|
||||
if ( rc != LDAP_SUCCESS || sb == NULL ) {
|
||||
if ( ld->ld_defconn && ld->ld_defconn->lconn_sb ) {
|
||||
sb = ld->ld_defconn->lconn_sb;
|
||||
|
||||
} else if ( ld->ld_sb ) {
|
||||
sb = ld->ld_sb;
|
||||
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1681,7 +1685,7 @@ ldap_install_tls( LDAP *ld )
|
||||
#ifndef HAVE_TLS
|
||||
return LDAP_NOT_SUPPORTED;
|
||||
#else
|
||||
if ( ld->ld_sb != NULL && ldap_pvt_tls_inplace( ld->ld_sb ) != 0 ) {
|
||||
if ( ldap_tls_inplace( ld ) ) {
|
||||
return LDAP_LOCAL_ERROR;
|
||||
}
|
||||
|
||||
@ -1703,7 +1707,7 @@ ldap_start_tls_s ( LDAP *ld,
|
||||
|
||||
/* XXYYZ: this initiates operation only on default connection! */
|
||||
|
||||
if ( ld->ld_sb != NULL && ldap_pvt_tls_inplace( ld->ld_sb ) != 0 ) {
|
||||
if ( ldap_tls_inplace( ld ) ) {
|
||||
return LDAP_LOCAL_ERROR;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user