atostm 3.2.0
ATOMAS atostm
Library

General (miscellaneous) library API. More...

Functions

ATO_STM_EXPORT const char * ato_stm_version (void)
 Return the version of the ATO Security Token Manager API. More...
 
ATO_STM_EXPORT int ato_stm_init (ato_Ctx *ctx, unsigned short flag)
 Initialise the SDK. More...
 
ATO_STM_EXPORT void ato_stm_deinit (void)
 Deinitialise the SDK. More...
 
ATO_STM_EXPORT const char * ato_stm_default_templatefile (void)
 The default filename for the STM template file. More...
 
ATO_STM_EXPORT int ato_stm_loadtemplate (ato_Ctx *ctx, char **buffer, const char *dirname, const char *filename)
 Helper method to load an STM template from a path. More...
 

Detailed Description

General (miscellaneous) library API.

Function Documentation

◆ ato_stm_version()

ATO_STM_EXPORT const char * ato_stm_version ( void  )

Return the version of the ATO Security Token Manager API.

Returns
version in the form major.minor.patch.tweak (not all levels may be present)

◆ ato_stm_init()

ATO_STM_EXPORT int ato_stm_init ( ato_Ctx ctx,
unsigned short  flag 
)

Initialise the SDK.

This must be called at application startup prior to any threads being started.

ato_base_init() must be called first.

Parameters
ctxthe current thread local Context.
flagused to control the initialisation process - use ATO_STM_INIT_ALL unless advised otherwise.
Returns
ATO_ERR_OK or an errcode.

◆ ato_stm_deinit()

ATO_STM_EXPORT void ato_stm_deinit ( void  )

Deinitialise the SDK.

This must be called at application shutdown after threads are finished and any allocated objects freed.

ato_base_deinit() should be called after all other deinitialisation routines are called.

◆ ato_stm_default_templatefile()

ATO_STM_EXPORT const char * ato_stm_default_templatefile ( void  )

The default filename for the STM template file.

Returns
the default STM template filename.

◆ ato_stm_loadtemplate()

ATO_STM_EXPORT int ato_stm_loadtemplate ( ato_Ctx ctx,
char **  buffer,
const char *  dirname,
const char *  filename 
)

Helper method to load an STM template from a path.

Parameters
ctxthe current thread local Context.
bufferthe address of the buffer to load the contents into - must be freed by the caller.
dirnamethe directory to use. Cannot be NULL. Can include or be the filename.
filenamethe filename to use. Can be NULL if just using dirname.
Returns
ATO_ERR_OK or an errcode.