Issue 8410 - LDAP connection issue with
Summary: LDAP connection issue with
Status: UNCONFIRMED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: 2.4.39
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
: 8403 (view as issue list)
Depends on:
Blocks:
 
Reported: 2016-04-21 13:10 UTC by kobibe0@gmail.com
Modified: 2020-03-22 21:25 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description kobibe0@gmail.com 2016-04-21 13:10:03 UTC
Full_Name: kobi beifus
Version: 2.4.39
OS: Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (195.110.40.242)


Hi,

I implemented a program that does the following:
    rc = ldap_initialize(ld, uri);
    if (rc != LDAP_SUCCESS) {
        return LOGIN_FAILURE_LDAP_SERVER_UNREACHABLE;
    }

    struct timeval tv = { .tv_sec = self->timeout, .tv_usec 0 0 };
    int version = LDAP_VERSION3;
    ldap_set_option(*ld, LDAP_OPT_NETWORK_TIMEOUT, &tv);
    ldap_set_option(*ld, LDAP_OPT_PROTOCOL_VERSION, &version);
    ldap_set_option(*ld, LDAP_OPT_REFERRALS, LDAP_OPT_OFF);
    if (self->ssl) {
        //int zero = 0;
        int tls_minimum_version = LDAP_OPT_X_TLS_PROTOCOL_TLS1_0;
        ldap_set_option(*ld, LDAP_OPT_X_TLS_PROTOCOL_MIN,
&tls_minimum_version);
        ldap_set_option(*ld, LDAP_OPT_X_TLS_CACERTFILE, "/var/ldap/ldap.pem");
        //ldap_set_option(*ld, LDAP_OPT_X_TLS_NEWCTX, &zero);
    }
    rc = ldap_sasl_bind_s(*ld, credentials_username, NULL, &credentials, NULL,
NULL, NULL);


When I updated the ldap.pem while the program is running, and try to established
new LDAP connection, it is not connecting with the updated pem file and failed
in ldap_sasl_bind_s.

With version 20, set option LDAP_OPT_X_TLS_NEWCTX  was added and it worked.
However, when I added it to version 2.4.39, it failed.
It looks like LDAP_OPT_X_TLS_NEWCTX doesn't work on 2.4.39 while the process is
not ended and trying to connect several connections.
Comment 1 Howard Chu 2016-04-26 11:55:45 UTC
published 8410
marked public
Comment 2 Quanah Gibson-Mount 2020-03-22 21:25:23 UTC
*** Issue 8403 has been marked as a duplicate of this issue. ***