From: Pierangelo Masarati Date: Sat, 5 Feb 2005 17:33:22 +0000 (+0000) Subject: temporarily revert to synchronous start tls X-Git-Tag: OPENLDAP_REL_ENG_2_3_BP~187 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e50092878d1102ac25ed79ea21a45907fbbb713c;p=openldap temporarily revert to synchronous start tls --- diff --git a/servers/slapd/back-ldap/bind.c b/servers/slapd/back-ldap/bind.c index c1c9791fd7..0436f98da7 100644 --- a/servers/slapd/back-ldap/bind.c +++ b/servers/slapd/back-ldap/bind.c @@ -249,15 +249,16 @@ ldap_back_prepare_conn( struct ldapconn **lcp, Operation *op, SlapReply *rs, lda /* 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 ) ) ) && !ldap_is_ldaps_url( li->url ) ) { +#if 0 int rc, msgid; LDAPMessage *res; int retries = 1; -retry:; rc = ldap_start_tls( ld, NULL, NULL, &msgid ); if ( rc == LDAP_SUCCESS ) { struct timeval tv = { 0, 0 }; +retry:; rc = ldap_result( ld, msgid, LDAP_MSG_ALL, &tv, &res ); if ( rc < 0 ) { 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 * is not "ldaps://"; this may occur not only in case diff --git a/servers/slapd/back-meta/conn.c b/servers/slapd/back-meta/conn.c index 1e8a9f09f4..ae769d76c0 100644 --- a/servers/slapd/back-meta/conn.c +++ b/servers/slapd/back-meta/conn.c @@ -224,6 +224,7 @@ init_one_conn( if ( ( LDAP_BACK_USE_TLS( li ) || ( op->o_conn->c_is_tls && LDAP_BACK_PROPAGATE_TLS( li ) ) ) && !ldap_is_ldaps_url( lt->mt_uri ) ) { +#if 0 int rc, msgid; LDAPMessage *res; 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 * is not "ldaps://"; this may occur not only in case