Format
#include <gskcms.h>
gsk_status gsk_open_directory (
const char * server_name,
int server_port,
const char * user_name,
const char * user_password,
int crl_cache_timeout,
gsk_handle * directory_handle)
Parameters
- server_name
- Specifies one or more blank-separated LDAP server host names.
Each host name can contain an optional port number separated from
the host name by a colon.
- server_port
- Specifies the port assigned to the LDAP server. The default
port will be used if zero is specified.
- user_name
- Specifies the distinguished name to be used when binding to
the LDAP server. An unauthenticated bind will be done if NULL is
specified for this parameter.
- user_password
- Specifies the password to be used when binding to the LDAP server.
NULL may be specified for this parameter when NULL is also specified
for the user_name parameter.
- crl_cache_timeout
- Specifies the CRL cache timeout interval in hours. Specify
0 to disable CRL caching.
- directory_handle
- Returns the directory handle. The application should call the gsk_close_directory() routine when it no longer
needs access to the LDAP directory.
Results
The function return value will be 0 if no error is detected. Otherwise,
it will be one of the return codes listed in the gskcms.h include
file. These are some possible errors:
- [CMSERR_LDAP]
- Error reported by the LDAP client
- [CMSERR_LDAP_NOT_AVAILABLE]
- LDAP server is not available.
- [CMSERR_NO_MEMORY]
- Insufficient storage is available
Usage
The gsk_open_directory() routine will open
an LDAP directory and return a directory handle.