]> git.sur5r.net Git - openldap/commitdiff
Import TLS external fix from HEAD, hopefully it gets more testing here
authorKurt Zeilenga <kurt@openldap.org>
Sun, 16 Sep 2001 22:37:25 +0000 (22:37 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sun, 16 Sep 2001 22:37:25 +0000 (22:37 +0000)
libraries/libldap/cyrus.c
libraries/libldap/ldap-int.h
libraries/libldap/tls.c

index af3d1ab3829c9b866c8ad5a193af14009b3ea661..6898d4e066379b9b094799b22367c200acb7712c 100644 (file)
@@ -662,6 +662,7 @@ ldap_int_sasl_bind(
 int
 ldap_int_sasl_external(
        LDAP *ld,
+       LDAPConn *conn,
        const char * authid,
        ber_len_t ssf )
 {
@@ -669,11 +670,7 @@ ldap_int_sasl_external(
        sasl_conn_t *ctx;
        sasl_external_properties_t extprops;
 
-       if( ld->ld_defconn == NULL ) {
-               return LDAP_LOCAL_ERROR;
-       }
-
-       ctx = ld->ld_defconn->lconn_sasl_ctx;
+       ctx = conn->lconn_sasl_ctx;
 
        if ( ctx == NULL ) {
                return LDAP_LOCAL_ERROR;
index 69719635bf5edcaaeb1228906cf04794e56a26c3..d5171055f4dca6757bd040f56faa171cbca2831a 100644 (file)
@@ -526,7 +526,8 @@ LDAP_F (int) ldap_int_sasl_open LDAP_P((
 LDAP_F (int) ldap_int_sasl_close LDAP_P(( LDAP *ld, LDAPConn *conn ));
 
 LDAP_F (int) ldap_int_sasl_external LDAP_P((
-       LDAP *ld, const char* authid, ber_len_t ssf ));
+       LDAP *ld, LDAPConn *conn,
+       const char* authid, ber_len_t ssf ));
 
 LDAP_F (int) ldap_int_sasl_get_option LDAP_P(( LDAP *ld,
        int option, void *arg ));
index 653caa3ee88578b974932e901d3e905b7af3d768..f31c97973c5958fb9fb7156b98cb400618e8213f 100644 (file)
@@ -1046,7 +1046,6 @@ int
 ldap_int_tls_start ( LDAP *ld, LDAPConn *conn, LDAPURLDesc *srv )
 {
        Sockbuf *sb = conn->lconn_sb;
-       void *ctx = ld->ld_defconn->lconn_tls_ctx;
        char *host;
        void *ssl;
 
@@ -1074,8 +1073,7 @@ ldap_int_tls_start ( LDAP *ld, LDAPConn *conn, LDAPURLDesc *srv )
         */
 
        ld->ld_errno = ldap_pvt_tls_check_hostname( ssl, host );
-       if (ld->ld_errno != LDAP_SUCCESS)
-       {
+       if (ld->ld_errno != LDAP_SUCCESS) {
                return ld->ld_errno;
        }
 
@@ -1090,7 +1088,7 @@ ldap_int_tls_start ( LDAP *ld, LDAPConn *conn, LDAPURLDesc *srv )
                ssf = ldap_pvt_tls_get_strength( ssl );
                authid = ldap_pvt_tls_get_peer( ssl );
 
-               (void) ldap_int_sasl_external( ld, authid, ssf );
+               (void) ldap_int_sasl_external( ld, conn, authid, ssf );
        }
 
        return LDAP_SUCCESS;