Functions | |
DS_Status | DS_Initialize (void) |
Initialize the Simple Directory API. More... | |
DS_Status | DS_InitializeWithLog (int) |
Initialize the Simple Directory API. More... | |
DS_Status | DS_InitializeSecurity (const char *path) |
Initialize the security environment. More... | |
void | DS_UninitializeSecurity (void) |
Disable strong operations and release any resources associated with the security environment. More... | |
int | DS_Version (void) |
Return the DSAPI library version. More... | |
Detailed Description
Functions in this group are used to initialize the API, and check its version.
Function Documentation
◆ DS_Initialize()
DS_Status DS_Initialize | ( | void | ) |
Initialize the Simple Directory API.
This initializes all the underlying libraries.
If a security environment is required, it needs to be initialized afterwards by calling DS_InitializeSecurity().
See alternative function DS_InitializeWithLog(int) that gives more control over log stream init.
- Returns
- DSAPI function status code.
◆ DS_InitializeWithLog()
DS_Status DS_InitializeWithLog | ( | int | ) |
Initialize the Simple Directory API.
An alternative to DS_Initialize() function. This initializes all the underlying libraries. The parameter is a flag that specifies whether to enable the DUA logging stream that is generated by the lib DS API.
If a security environment is required, it needs to be initialized afterwards by calling DS_InitializeSecurity().
- Returns
- DSAPI function status code.
◆ DS_InitializeSecurity()
DS_Status DS_InitializeSecurity | ( | const char * | path | ) |
Initialize the security environment.
The security environment may not be available on all platforms. If it is available and is needed, it needs to be initialized with the location of a filestore directory containing an "x509" subdirectory containing identity, TLS anchors, and CRL information.
On Windows the default location is the "Application Data\Isode" directory inside the current user's "Documents and Settings" directory.
On Unix the default location is the current user's home directory.
- Parameters
-
path Location of the directory, or NULL to use platform-specific defaults.
- Returns
- DSAPI function status code.
- Since
- DSAPI_VERSION 2003
◆ DS_UninitializeSecurity()
void DS_UninitializeSecurity | ( | void | ) |
Disable strong operations and release any resources associated with the security environment.
This function can be used to signal that no further use will be made of X509 functionality, and provides the underlying libraries with the opportunity to clean up any data structures or temporary files which are consequently no longer required.
The function may be called when a program is about to terminate, or in the event that DS_InitializeSecurity is to be called with a new set of parameters.
After calling this function, no further attempts should be made to perform strong binds or signed operations without first making another suitable call to DS_InitializeSecurity. If any strong sessions are active when this function is called, then the behaviour of any subsequent operations on those sessions is unpredictable.
- Since
- DSAPI_VERSION 2013
◆ DS_Version()
int DS_Version | ( | void | ) |
Return the DSAPI library version.
This could be compared with the value of DSAPI_VERSION to check what functions are available at runtime.
- Returns
- the version of the DSAPI implemented by the library, which is calculated as (major_version * 100) + minor_version.
Different major versions indicate incompatible APIs and ABIs. Different minor versions indicate additional functions are available, but the API and ABI are otherwise backwards compatible. So for example an application built against version 2000 will run correctly with a runtime library of version 2005, whereas an application built using features of version 2005 will not work against a runtime of version 2000.