[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Cannot bind with 2.4.35
- Subject: Re: Cannot bind with 2.4.35
- From: Olivier Nicole <olivier.nicole@cs.ait.ac.th>
- Date: Tue, 3 Sep 2013 11:24:53 +0700
- Cc: openldap-technical@openldap.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:cc:content-type; bh=ZmkXSe209OEL2AGTgUXpd27ivKvYdeFhwbf4B0KPyn8=; b=JbT+07t5pvjbW1LdCq1FqwllZb0QX2rkCXBv5jrJDtb7UEtZImzl3vvfUfxAulFwOU nukPTLFU3/TSgfmwrn9HJebZvikCHk6GDU/iACX/z8tFiR5fTrZCqjWePpdN+fyD2tlw VqMUTwExHoIwaxVJPH8272MKOKOrkNo8INRkc9TZJ2dSo4YzJwmF2TsRiWwUJ4l0+rKS CSjvZyemu+T0eekHxdBu54YSLbXC+fN/OBlnamQokBKUWrMpL5Kz491nGlOurOFWZ0zK v8FscRjSP26S2TbXlW9jmxKLEeuFBB1BTCfhcEllfrcXcd4JJPm5vUEJyz4za5npKPaN RHIw==
- In-reply-to: <wu7r4d6munt.fsf@banyan.cs.ait.ac.th>
- References: <wu7r4d6munt.fsf@banyan.cs.ait.ac.th>
My mistake, I forgot to configure TLS_CACERT in ldap.conf.
I thought I checked that yesterday evening.
Olivier
On Tue, Sep 3, 2013 at 10:49 AM, Olivier Nicole
<Olivier.Nicole@cs.ait.ac.th> wrote:
> 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 */
> }
> }
>
> --
>