From: Quanah Gibson-Mount Date: Thu, 31 Jan 2019 02:33:17 +0000 (+0000) Subject: ITS#8957 - Fix ASYNC TLS X-Git-Tag: OPENLDAP_REL_ENG_2_5_0ALPHA~67^2~127 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09ff530036a04a01ad4250eeac2cf30349976ddc;p=thirdparty%2Fopenldap.git ITS#8957 - Fix ASYNC TLS Fix ASYNC TLS by correctly handling a return code of -2 in addition to 0 --- diff --git a/libraries/libldap/open.c b/libraries/libldap/open.c index bb81d86a76..20b3dfcd4b 100644 --- a/libraries/libldap/open.c +++ b/libraries/libldap/open.c @@ -489,7 +489,7 @@ ldap_int_open_connection( #endif #ifdef HAVE_TLS - if (rc == 0 && ( ld->ld_options.ldo_tls_mode == LDAP_OPT_X_TLS_HARD || + if ((rc == 0 || rc == -2) && ( ld->ld_options.ldo_tls_mode == LDAP_OPT_X_TLS_HARD || strcmp( srv->lud_scheme, "ldaps" ) == 0 )) { ++conn->lconn_refcnt; /* avoid premature free */