ldap_parse_sasl_bind_result()--Extract Server Credentials from SASL Bind Results



  Syntax
 #include <ldap.h>
 
 int ldap_parse_sasl_bind_result(
       LDAP            *ld,
       LDAPMessage     *res,
       struct berval   **servercredp,
       int             freeit)

  Default Public Authority: *USE

  Library Name/Service Program: QSYS/QGLDCLNT

  Threadsafe: Yes

The ldap_parse_sasl_bind_result() function is used to obtain server credentials, as a result of an attempt to perform mutual authentication.


Authorities and Locks

No IBM® i authority is required.


Parameters

ld
(Input) Specifies the LDAP pointer returned by a previous call to ldap_init(), ldap_ssl_init(), or ldap_open().
res
(Input) Specifies the result of an LDAP operation as returned by ldap_result() or one of the synchronous LDAP API operation calls.
servercredp
(Output) Specifies a pointer to a result parameter. For SASL bind results, this result parameter will be filled in with the credentials returned by the server for mutual authentication (if returned). The credentials, if returned, are returned in a struct berval. NULL may be supplied to ignore this field.
freeit
(Input) Specifies a boolean value that determines if the LDAP result chain (as specified by ref) is to be freed. Any non-zero value will result in the LDAP result chain being freed after the requested information is extracted. Alternatively, the ldap_msgfree() API can be used to free the LDAP result chain at a later time.

Return Value

LDAP_SUCCESS
if the result was successfully located and parsed.

another LDAP error code
if not successfully parsed.

Error Conditions

The ldap_parse_sasl_bind_result() function will return an LDAP error code if not successful. See LDAP Client API Error Conditions for possible LDAP error code values.


Error Messages

The following message may be sent from this function.

Message ID Error Message Text
CPF3CF2 E Error(s) occurred during running of ldap_parse_sasl_bind_result API.


Related Information



API introduced: V4R5

[ Back to top | LDAP APIs | APIs by category ]