Summary: Isode provides a number of APIs which allow integrators and product developers to build components that allow client programs to connect to, query and modify data in the directory.

Macros

#define DS_SASL_BEST_SSF   (65535)
 

Enumerations

enum  DSBindType { DSAnonymous = 0, DSSimple = 1, DSStrong = 2, DSSASL = 3 }
 

Functions

DS_Status DS_BindParams_New (DS_BindParams **params_p)
 Create a bind parameters structure. More...
 
void DS_BindParams_Delete (DS_BindParams *params)
 Delete a bind parameters object. More...
 
DS_Status DS_BindParams_Copy (const DS_BindParams *in, DS_BindParams **copy_p)
 Copy a DS_BindParams structure. More...
 
DS_Status DS_BindParams_GetBindType (const DS_BindParams *params, DSBindType *bind_type)
 Get the bind type for this bind params. More...
 
DS_Status DS_BindParams_SetIdentity (DS_BindParams *params, const DS_Identity *id)
 Set or clear the identity for this bind params. More...
 
DS_Status DS_BindParams_SetCertificateServer (DS_BindParams *params, const char *ldap_host, long ldap_port, int check_crls)
 Set or clear the details for the LDAP server that holds certificates and/or CRLs. More...
 
DS_Status DS_BindParams_GetIdentity (const DS_BindParams *params, const DS_Identity **id_p)
 identity for this bind params. More...
 
DS_Status DS_BindParams_GetCertificateServer (const DS_BindParams *params, const char **ldap_host, long *ldap_port, int *check_crls)
 Get the details of the LDAP server used to locate certificates and/or CRLs. More...
 
DS_Status DS_BindParams_SetAnonymous (DS_BindParams *params)
 Mark this set of bind parameters as being for an anonymous bind. More...
 
DS_Status DS_BindParams_SetSimple (DS_BindParams *params, const DS_DN *bind_dn, const char *password)
 Mark this set of bind parameters as being for a simple bind. More...
 
DS_Status DS_BindParams_SetStrong (DS_BindParams *params, const DS_Identity *id, const DS_DN *dsa_dn)
 Mark this set of bind parameters as being for a strong bind. More...
 
DS_Status DS_BindParams_SetSASL (DS_BindParams *params, const char *sasl_mechs, const DS_SASLProps *sasl_props, const char *sasl_authentication, const char *sasl_secret)
 Mark this set of bind parameters as being for a SASL bind. It only makes sense to do SASL binds on an LDAP connection (not DAP) More...
 

Detailed Description

Macro Definition Documentation

#define DS_SASL_BEST_SSF   (65535)

A constant which can be used to indicate that the "best available" security-strength factor should be used.

Since
DSAPI_VERSION 2041

Definition at line 61 of file dsapi_bindparams.h.

Enumeration Type Documentation

enum DSBindType

Values of the 'bind_type' field in a DS_BindParams structure.

Enumerator
DSAnonymous 

Anonymous bind.

DSSimple 

Simple bind.

DSStrong 

Strong bind.

DSSASL 

SASL bind.

Definition at line 54 of file dsapi_bindparams.h.

54  {
55  DSAnonymous = 0,
56  DSSimple = 1,
57  DSStrong = 2,
58  DSSASL = 3
59 } DSBindType;
DSBindType

Function Documentation

DS_Status DS_BindParams_New ( DS_BindParams **  params_p)

Create a bind parameters structure.

Parameters
[out]params_pReturned handle or NULL on error
Return values
DS_E_MOMEMORYAn internal memory allocation failed
DS_E_NOERRORA valid handle was returned
void DS_BindParams_Delete ( DS_BindParams params)

Delete a bind parameters object.

Parameters
params[in] Handle to delete. If this is NULL, no action is taken.
DS_Status DS_BindParams_Copy ( const DS_BindParams in,
DS_BindParams **  copy_p 
)

Copy a DS_BindParams structure.

The caller is responsible for freeing the copied structure using DS_BindParams_Delete.

Parameters
[in]inthe DS_BindParams to copy
[out]copy_pPointer to returned copy.
Return values
DS_E_BADPARAMin or copy_p was NULL
DS_E_MOMEMORYAn internal memory allocation failed
DS_E_INTERNALAn internal error occurred
DS_E_NOERRORA valid handle was returned
DS_Status DS_BindParams_GetBindType ( const DS_BindParams params,
DSBindType bind_type 
)

Get the bind type for this bind params.

Parameters
[in]paramsbind parameters.
[out]bind_typepointer to receive returned copy.
Return values
DS_E_BADPARAMparams or bind_type was NULL
DS_E_NOERRORthe information was returned.
DS_Status DS_BindParams_SetIdentity ( DS_BindParams params,
const DS_Identity id 
)

Set or clear the identity for this bind params.

Any existing identity information for this DS_BindParams structure is discarded.

A copy of id will be made, which means that the caller may delete the original DS_Identity once this function has been called.

Parameters
[in]paramsbind parameters to be updated.
[in]ididentity information. May be NULL to indicate that no identity is to be used with these bind parameters.
Return values
DS_E_BADPARAMparams was NULL
DS_E_INTERNALAn internal error occurred
DS_E_NOERRORthe identity information was updated.
DS_Status DS_BindParams_SetCertificateServer ( DS_BindParams params,
const char *  ldap_host,
long  ldap_port,
int  check_crls 
)

Set or clear the details for the LDAP server that holds certificates and/or CRLs.

Any existing server information for this DS_BindParams structure is discarded.

Parameters
[in]paramsbind parameters to be updated.
[in]ldap_hostname of LDAP server. May be NULL to indicate that no LDAP server is to be used
[in]ldap_portport number of LDAP server. A value of zero is taken to mean the default LDAP port (389). Ignored if ldap_host is NULL
[in]check_crlsnon-zero to indicate that CRL checking is requested. Ignored if ldap_host is NULL
Return values
DS_E_BADPARAMparams was NULL
DS_E_NOMEMORYa memory allocation failed
DS_E_NOERRORthe identity information was updated.
DS_Status DS_BindParams_GetIdentity ( const DS_BindParams params,
const DS_Identity **  id_p 
)

identity for this bind params.

Parameters
[in]paramsbind parameters.
[out]id_ppointer to receive returned reference. This must not be modified, but it may be copied with DS_Identity_Copy. If there is no identity associated with the bind parameters, then id_p will be set to NULL.
Return values
DS_E_BADPARAMparams or id_p was NULL
DS_E_INTERNALAn internal error occurred
DS_E_NOERRORthe identity information was returned.
DS_Status DS_BindParams_GetCertificateServer ( const DS_BindParams params,
const char **  ldap_host,
long *  ldap_port,
int *  check_crls 
)

Get the details of the LDAP server used to locate certificates and/or CRLs.

Parameters
[in]paramsbind parameters.
[out]ldap_hostpointer to receive returned reference. This is a read-only pointer. If no LDAP server is configured, then ldap_host will be set to NULL.
[out]ldap_portport number of LDAP server. A value of zero will be returned if no LDAP server is configured.
[out]check_crlsnon-zero to indicate that CRL checking is required. This parameter may be set to NULL if the caller does not need this information to be returned.
Return values
DS_E_BADPARAMparams or ldap_host or ldap_port was NULL
DS_E_NOERRORthe LDAP server information was returned.
DS_Status DS_BindParams_SetAnonymous ( DS_BindParams params)

Mark this set of bind parameters as being for an anonymous bind.

Parameters
[in]paramsbind parameters to be updated.
Return values
DS_E_BADPARAMparams was NULL
DS_E_NOERRORthe information was updated and the object is ready to be used to effect a simple bind.
DS_Status DS_BindParams_SetSimple ( DS_BindParams params,
const DS_DN bind_dn,
const char *  password 
)

Mark this set of bind parameters as being for a simple bind.

Parameters
[in]paramsbind parameters to be updated.
[in]bind_dnDN to bind as
[in]passwordpassword to use. This may be NULL to indicate a "name only" bind.
Return values
DS_E_BADPARAMparams or bindDN was NULL
DS_E_MOMEMORYAn internal memory allocation failed
DS_E_NOERRORthe information was updated and the object is ready to be used to effect a simple bind.
DS_Status DS_BindParams_SetStrong ( DS_BindParams params,
const DS_Identity id,
const DS_DN dsa_dn 
)

Mark this set of bind parameters as being for a strong bind.

Parameters
[in]paramsbind parameters to be updated.
[in]ididentity information. Must not be NULL; an identity is always required for a strong bind.
[in]dsa_dnDN of DSA that is being bound to. This value is required for a DAP strong bind, but ignored for an LDAP strong bind (and so may be NULL)
Return values
DS_E_BADPARAMparams or id was NULL
DS_E_MOMEMORYAn internal memory allocation failed
DS_E_NOERRORthe information was updated and the object is ready to be used to effect a strong bind.
DS_Status DS_BindParams_SetSASL ( DS_BindParams params,
const char *  sasl_mechs,
const DS_SASLProps sasl_props,
const char *  sasl_authentication,
const char *  sasl_secret 
)

Mark this set of bind parameters as being for a SASL bind. It only makes sense to do SASL binds on an LDAP connection (not DAP)

Parameters
[in]paramsbind parameters to be updated.
[in]sasl_mechsthe SASL mechanism. Depending on mechanism, other parameters may be used
[in]sasl_propsan optional set of SASL properties to be associated with this bind. This parameter may be NULL.
[in]sasl_authenticationuserid to authenticate with if required (e.g. "user@example.com")
[in]sasl_secretSASL secret, or NULL if one is not required for the selected mechanism
Return values
DS_E_BADPARAMparams or sasl_mechs was NULL
DS_E_MOMEMORYAn internal memory allocation failed
DS_E_NOERRORthe information was updated and the object is ready to be used to effect a SASL bind.
Since
DSAPI_VERSION 2041