Click to See Complete Forum and Search --> : problem with TLS in Win32 LDAP


tomaszkaz
October 20th, 2009, 09:43 AM
Hello,

I'm trying to connect to a LDAP server using Win32 LDAP API, over a TLS connection. The problem is that when I call the ldap_start_tls_s function, it fails with return code: LDAP_LOCAL_ERROR (0x52).
I've searched on MSDN and in Google, but there's no answer what this error could mean in this particular function.

my call to the function looks like this:
result = ldap_start_tls_s(ld, &serverReturnValue, &msg, 0, 0);

Connecting to the same server using OpenLDAP works fine.

Moreover, there are also problems with connecting to the server using SSL (port 636) connection (the error is LDAP_SERVER_DOWN - 0x51).

When trying to connect using non-encrypted connection, the server is communicated, but it rejects non-encrypted connections (ldap_bind returns LDAP_STRONG_AUTH_REQUIRED - 0x08).

I've tried connecting with the server using LDAPSearch, and it connects without problems (using SSL connection).

tomaszkaz
October 21st, 2009, 06:04 AM
It turned out that there was a problem with the LDAP server domain name - I gave only a part of the FQDN and the system couldnt find apropriate certificate.