mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-02-05 13:40:08 +08:00
temporarily revert to synchronous start tls
This commit is contained in:
parent
73ca57cfef
commit
e50092878d
@ -249,15 +249,16 @@ ldap_back_prepare_conn( struct ldapconn **lcp, Operation *op, SlapReply *rs, lda
|
|||||||
/* start TLS ("start-tls"/"try-start-tls" statements) */
|
/* start TLS ("start-tls"/"try-start-tls" statements) */
|
||||||
if ( ( LDAP_BACK_USE_TLS( li ) || ( op->o_conn->c_is_tls && LDAP_BACK_PROPAGATE_TLS( li ) ) )
|
if ( ( LDAP_BACK_USE_TLS( li ) || ( op->o_conn->c_is_tls && LDAP_BACK_PROPAGATE_TLS( li ) ) )
|
||||||
&& !ldap_is_ldaps_url( li->url ) ) {
|
&& !ldap_is_ldaps_url( li->url ) ) {
|
||||||
|
#if 0
|
||||||
int rc, msgid;
|
int rc, msgid;
|
||||||
LDAPMessage *res;
|
LDAPMessage *res;
|
||||||
int retries = 1;
|
int retries = 1;
|
||||||
|
|
||||||
retry:;
|
|
||||||
rc = ldap_start_tls( ld, NULL, NULL, &msgid );
|
rc = ldap_start_tls( ld, NULL, NULL, &msgid );
|
||||||
if ( rc == LDAP_SUCCESS ) {
|
if ( rc == LDAP_SUCCESS ) {
|
||||||
struct timeval tv = { 0, 0 };
|
struct timeval tv = { 0, 0 };
|
||||||
|
|
||||||
|
retry:;
|
||||||
rc = ldap_result( ld, msgid, LDAP_MSG_ALL, &tv, &res );
|
rc = ldap_result( ld, msgid, LDAP_MSG_ALL, &tv, &res );
|
||||||
if ( rc < 0 ) {
|
if ( rc < 0 ) {
|
||||||
rs->sr_err = LDAP_OTHER;
|
rs->sr_err = LDAP_OTHER;
|
||||||
@ -293,6 +294,10 @@ retry:;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
|
||||||
|
#endif
|
||||||
|
rs->sr_err = ldap_start_tls_s( ld, NULL, NULL );
|
||||||
|
|
||||||
/* if StartTLS is requested, only attempt it if the URL
|
/* if StartTLS is requested, only attempt it if the URL
|
||||||
* is not "ldaps://"; this may occur not only in case
|
* is not "ldaps://"; this may occur not only in case
|
||||||
|
@ -224,6 +224,7 @@ init_one_conn(
|
|||||||
if ( ( LDAP_BACK_USE_TLS( li ) || ( op->o_conn->c_is_tls && LDAP_BACK_PROPAGATE_TLS( li ) ) )
|
if ( ( LDAP_BACK_USE_TLS( li ) || ( op->o_conn->c_is_tls && LDAP_BACK_PROPAGATE_TLS( li ) ) )
|
||||||
&& !ldap_is_ldaps_url( lt->mt_uri ) )
|
&& !ldap_is_ldaps_url( lt->mt_uri ) )
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
int rc, msgid;
|
int rc, msgid;
|
||||||
LDAPMessage *res;
|
LDAPMessage *res;
|
||||||
int retries = 1;
|
int retries = 1;
|
||||||
@ -268,6 +269,9 @@ retry:;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
rs->sr_err = ldap_start_tls_s( lsc->msc_ld, NULL, NULL );
|
||||||
|
#endif
|
||||||
|
|
||||||
/* if StartTLS is requested, only attempt it if the URL
|
/* if StartTLS is requested, only attempt it if the URL
|
||||||
* is not "ldaps://"; this may occur not only in case
|
* is not "ldaps://"; this may occur not only in case
|
||||||
|
Loading…
Reference in New Issue
Block a user