Finishes a DIGEST-MD5 bind started by a call to ldap_bind_digest_md5_start. It must also be called if the application must abort the bind sequence after calling ldap_bind_digest_md5_start.
#include <ldap.h> int ldap_bind_digest_md5_finish ( LDAP_DIGEST_MD5_CONTEXT *digestMD5ctx, char *authID, char *password, int passwordLen, int realmIndex, int abortFlag );
(IN) The DIGEST-MD5 context created by a call to ldap_bind_digest_md5_begin_s. The function will set the context pointer to NULL.
(IN) A NULL-terminated UTF-8 encode string containing the properly formated authorization identity for the user to be authenticated.
(IN) A NULL-terminated UTF-8 encode string containing the user’s password.
(IN) The length in bytes of the password. This is required to allow passwords that have embedded NULL bytes. If the password is known to be a NULL-terminated string, the passwordLen value can be set to minus one (-1) or the length of the string.
(IN) This is the index of the realm selected by the client application.
(IN) Must be equal to DIGEST_MD5_ABORT or DIGEST_MD5_FINISH.
0x00 |
LDAP_SUCCESS |
Non-zero |
Failure. For a complete list, see |
If abortFlag is equal to DIGEST_MD5_FINISH, the function attempts to complete the bind sequence with the server and then frees any memory allocated during the bind process. If abortFlag is equal to DIGEST_MD5_ABORT, the function sends a SASL bind request to the server with a zero length string for the mechanism and no credentials. This signals the server that the bind sequence was aborted by the client. Any allocated memory is also freed.