[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Cannot bind with 2.4.35
- To: openldap-technical@openldap.org
- Subject: Cannot bind with 2.4.35
- From: Olivier Nicole <Olivier.Nicole@cs.ait.ac.th>
- Date: Tue, 03 Sep 2013 10:49:26 +0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cs.ait.ac.th; h= content-type:content-type:mime-version:message-id:date:date :subject:subject:from:from:received:received:received; s= selector1; t=1378180167; x=1379994568; bh=2nFA/HmCTpo8Wcw3NJ6T7p rO3YD3CjNTQv7ZVXubI/Y=; b=lsmK2eTH1g23kMiiTELEyr2yqELNwbXfU+SYAJ 0K3sfOI+RAsW4WbbF2TBKhTr+ygI2o/sS78VUuQthDs5e+sY8sDZBaF6e2CltyJK tym696uLhOPm8Nk1qCEkcIUkcowrVUG73EPLAmY0J8Wm2/trptKNxkMG3+BYMZ5n cOgdM=
Hi,
I have a small program that I wrote some time back. It authenticates
against an LDAP server.
Linked with the library provided with OpenLDAP 2.3.40 it works fine, but
when I tried to upgrade to 2.4.35, it would not bind anymore.
The LDAP server (on a different machine) has not changed, the version of
my program with the old library is still working fine.
I am getting the error: Can't contact LDAP server
I am useing self signed CA.
The program is below.
Thank you in advance,
Olivier
i=ldap_initialize(&ldap, "ldaps://ldap.x.y.z/");
if (i != LDAP_SUCCESS) {
ERROR;
}
i=ldap_set_option(ldap, LDAP_OPT_REFERRALS, LDAP_OPT_OFF);
if (i!=LDAP_OPT_SUCCESS) {
ERROR;
}
i=ldap_set_option(ldap, LDAP_OPT_RESTART, LDAP_OPT_ON);
if (i!=LDAP_OPT_SUCCESS) {
ERROR;
}
res=LDAP_VERSION3;
i=ldap_set_option(ldap, LDAP_OPT_PROTOCOL_VERSION, &res);
if (i!=LDAP_OPT_SUCCESS) {
ERROR;
}
/* DN containts the dn and passwd contains the password, they are
correct */
i=ldap_bind_s(ldap, DN, passwd, LDAP_AUTH_SIMPLE);
if (i != LDAP_SUCCESS) {
if (i==49) {
/* bad user or password */
}
else if (i==53) {
/* empty password */
}
else {
/* print ldap_err2string(i) */
/* this is where I get the error */
}
}
--