enable use of asynchronous call to StartTLS

This commit is contained in:
Pierangelo Masarati 2005-04-16 02:56:46 +00:00
parent 44635400cf
commit a141e3badf
2 changed files with 6 additions and 3 deletions

View file

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

View file

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