Hi All,

I am new to Openldap and have been doing some basic testing with an application software I am working with. This software has an ldap protocol interface that talks to an ldap server using the Openldap library version 2.4 supporting operations such as search, add, delete.

I am currently facing a challenge in understanding as to how this interface can send out a bind request with sasl mechanism as not simple. 

The code snippet trying to initiate an asynchronous bind is as below:

ldap_sasl_bind(ldaphandle, dn, NULL, cred, NULL, NULL , &msgID);

This code is initiating a bind with mechanism as simple when I capture the packets on the wire which I believe is because of the third parameter in this function call being NULL. The man page for bind operations http://www.openldap.org/software/man.cgi?query=ldap_sasl_bind&apropos=0&sektion=0&manpath=OpenLDAP+2.4-Release&format=html does not speak about what values should I pass to the third parameter if I want to use a specific sasl mechanism. Can this just be a user defined string or a specific string that openldap expects.

From the openldap source code, I notice that sasl.c file has a constant LDAP_SASL_SIMPLE as a constant for mechanism which is a NULL value. I tried to pass a non NULL value in my function call to ldap_sasl_bind in the third parameter expecting it to hit the other code path to initiate SASL bind with credentials but the library does not seem to allow it and returns error from sasl bind.

Any inputs in this direction would be really helpful.

regards,
Nishanth