Behavior of the ldap_sslinit() function from wldap32.dll

Alain Nyeck 0 Reputation points
2024-08-06T14:50:18.38+00:00

When using ldap_sslinit(domain, 636, 1) to initiate an LDAP connection over SSL/TLS, on the first attempt, is the LDAP client initially connects to port 389 (the standard LDAP port) to perform a lookup or preliminary actions?

Thank you

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,653 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Xiaopo Yang - MSFT 12,726 Reputation points Microsoft Vendor
    2024-08-07T01:57:09.2866667+00:00

    Hello @Alain Nyeck,

    NO. According to Using ldap_init, LDAP_PORT (389) establishes an Unencrypted Session while LDAP_SSL_PORT (636) or LDAP_SSL_GC_PORT (3269) establishes an entire session encrypted.

    • To have the entire session encrypted, including the authentication step, call the ldap_init function with its PortNumber parameter set to either LDAP_SSL_PORT (636) or to LDAP_SSL_GC_PORT (3269).

    An unencrypted session can be created using the ldap_init function. To do this, call the ldap_init function with its PortNumber parameter set to LDAP_PORT (389).

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.