ld structure. (You can retrieve it by calling the ldap_get_lderrno() function.)
SASL authentication is part of the LDAP v3 protocol. When calling this function, make sure that you are working with a server that supports the LDAP v3 protocol.
#include <ldap.h>
int ldap_parse_sasl_bind_result( LDAP *ld, LDAPMessage *res,
struct berval **servercredp, int freeit );
ld |
Connection handle, which is a pointer to an |
res |
Pointer to the |
servercredp |
Pointer to a pointer to an
When done, you can free this by calling the |
freeit |
Specifies whether or not to free the results of the operation (the |
LDAP_SUCCESS if the results were parsed successfully. LDAP_PARAM_ERROR if an invalid parameter was passed to the function. LDAP_NOT_SUPPORTED if your LDAP client does not specify that it is using the LDAP v3 protocol. Make sure that you set the version of your LDAP client to version 3 before calling this function. (For details, see "Specifying the LDAP Version of Your Client" on page 54.) LDAP_DECODING_ERROR if an error occurred when decoding the BER-encoded message. ldap_sasl_bind() function and the ldap_result() function, you can pass the results to the ldap_parse_sasl_bind_result() function parse the results from the server.
This function gets the following data from the server's response:
berval structure as the servercredp argument. ld structure. You can get the result code by calling the ldap_get_lderrno() function. ldap_sasl_bind_s() function. LDAP_SASL_BIND_IN_PROGRESS, you can call ldap_sasl_bind() again to send a response to the server's challenge and call ldap_result() and ldap_parse_sasl_bind_result() again to get the next challenge from the server.
The LDAP server must support authentication through SASL mechanisms. The Netscape Directory Server 3.0 supports a server plug-in interface that you can use to add SASL support to the server. For details, see the Netscape Directory Server 3.0 Programmer's Guide.
ldap_sasl_bind(), ldap_get_lderrno().
Last Updated: 10/01/98 17:06:23