ldap_bind_digest_md5_finish

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.

LDAP Version:v2 or higher
Library:*ldapsdk.*
NDS Version:7.xx or higher
Platform:NLM, Windows (NT, 95, 98, 2000, XP, Vista 32-bit and 64-bit ), Linux (32-bit and 64-bit), Solaris, AIX, and HP-UX

Syntax

  #include <ldap.h>
  
  int ldap_bind_digest_md5_finish (
     LDAP_DIGEST_MD5_CONTEXT   *digestMD5ctx,
     char                      *authID,
     char                      *password,
     int                        passwordLen,
     int                        realmIndex,
     int                        abortFlag
  );
  
  

Parameters

digestMD5ctx

(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.

authID

(IN) A NULL-terminated UTF-8 encode string containing the properly formated authorization identity for the user to be authenticated.

password

(IN) A NULL-terminated UTF-8 encode string containing the user’s password.

passwordLen

(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.

realmIndex

(IN) This is the index of the realm selected by the client application.

abortFlag

(IN) Must be equal to DIGEST_MD5_ABORT or DIGEST_MD5_FINISH.

Return Values

0x00

LDAP_SUCCESS

Non-zero

Failure. For a complete list, see LDAP Return Codes.

Remarks

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.

See Also

ldap_bind_digest_md5_start