mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-18 01:58:33 -05:00
enable use of asynchronous call to StartTLS
This commit is contained in:
parent
44635400cf
commit
a141e3badf
2 changed files with 6 additions and 3 deletions
|
|
@ -113,6 +113,9 @@ typedef enum ldap_back_send_t {
|
|||
LDAP_BACK_SENDRESULT = (LDAP_BACK_SENDOK|LDAP_BACK_SENDERR)
|
||||
} ldap_back_send_t;
|
||||
|
||||
/* define to use asynchronous StartTLS */
|
||||
#define SLAP_STARTTLS_ASYNCHRONOUS
|
||||
|
||||
LDAP_END_DECL
|
||||
|
||||
#include "proto-ldap.h"
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ ldap_back_prepare_conn( struct ldapconn **lcp, Operation *op, SlapReply *rs, lda
|
|||
if ( ( LDAP_BACK_USE_TLS( li ) || ( op->o_conn->c_is_tls && LDAP_BACK_PROPAGATE_TLS( li ) ) )
|
||||
&& !ldap_is_ldaps_url( li->url ) )
|
||||
{
|
||||
#if 1
|
||||
#ifdef SLAP_STARTTLS_ASYNCHRONOUS
|
||||
/*
|
||||
* use asynchronous StartTLS
|
||||
* in case, chase referral (not implemented yet)
|
||||
|
|
@ -315,12 +315,12 @@ retry:;
|
|||
ldap_msgfree( res );
|
||||
}
|
||||
}
|
||||
#else
|
||||
#else /* ! SLAP_STARTTLS_ASYNCHRONOUS */
|
||||
/*
|
||||
* use synchronous StartTLS
|
||||
*/
|
||||
rs->sr_err = ldap_start_tls_s( ld, NULL, NULL );
|
||||
#endif
|
||||
#endif /* ! SLAP_STARTTLS_ASYNCHRONOUS */
|
||||
|
||||
/* if StartTLS is requested, only attempt it if the URL
|
||||
* is not "ldaps://"; this may occur not only in case
|
||||
|
|
|
|||
Loading…
Reference in a new issue