atoakm  3.2.0
ATOMAS atoakm
Library

General (miscellaneous) library API. More...

Functions

ATO_AKM_EXPORT const char * ato_akm_version (void)
 Return the version of the keystore Manager API. More...
 
ATO_AKM_EXPORT int ato_akm_init (ato_Ctx *ctx, unsigned short flag)
 Initialise the SDK. More...
 
ATO_AKM_EXPORT void ato_akm_deinit (void)
 Deinitialise the SDK. More...
 
ATO_AKM_EXPORT const char * ato_akm_default_dir (void)
 The default directory/folder for the keystore. More...
 
ATO_AKM_EXPORT const char * ato_akm_default_ksfile (void)
 The default keystore filename. More...
 
ATO_AKM_EXPORT const char * ato_akm_default_kspath (void)
 The full path for the default keystore including the default filename. More...
 
ATO_AKM_EXPORT int ato_akm_loadks (ato_Ctx *ctx, char **buffer, const char *dirname, const char *filename)
 Convenience method to load a keystore from the give path "dirname/filename" into a buffer - caller must free. More...
 
ATO_AKM_EXPORT int ato_akm_saveks (ato_Ctx *ctx, const char *buffer, const char *dirname, const char *filename)
 Convenience method to save a keystore buffer to the given path "dirname/filename". More...
 

Detailed Description

General (miscellaneous) library API.

Function Documentation

◆ ato_akm_version()

ATO_AKM_EXPORT const char* ato_akm_version ( void  )

Return the version of the keystore Manager API.

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

◆ ato_akm_init()

ATO_AKM_EXPORT int ato_akm_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_AKM_INIT_ALL unless advised otherwise.
Returns
ATO_ERR_OK

◆ ato_akm_deinit()

ATO_AKM_EXPORT void ato_akm_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_akm_default_dir()

ATO_AKM_EXPORT const char* ato_akm_default_dir ( void  )

The default directory/folder for the keystore.

This is the user's home, platform/OS specific, folder.

Returns
the default home keystore folder.

◆ ato_akm_default_ksfile()

ATO_AKM_EXPORT const char* ato_akm_default_ksfile ( void  )

The default keystore filename.

Returns
the default keystore filename.

◆ ato_akm_default_kspath()

ATO_AKM_EXPORT const char* ato_akm_default_kspath ( void  )

The full path for the default keystore including the default filename.

Returns
the default keystore path.

◆ ato_akm_loadks()

ATO_AKM_EXPORT int ato_akm_loadks ( ato_Ctx ctx,
char **  buffer,
const char *  dirname,
const char *  filename 
)

Convenience method to load a keystore from the give path "dirname/filename" into a buffer - caller must free.

If dirname and/or ato_akm_default_ksfile() are NULL then try to discover the default values from the config file else use the hard coded values provided by ato_akm_default_dir()/ato_akm_default_ksfile().

Parameters
ctxthe current thread local Context.
bufferthe address of the buffer that is allocated if successful.
dirnamethe directory to load from
filenamethe keystore filename to load
Returns
ATO_ERR_OK if successful or error.

◆ ato_akm_saveks()

ATO_AKM_EXPORT int ato_akm_saveks ( ato_Ctx ctx,
const char *  buffer,
const char *  dirname,
const char *  filename 
)

Convenience method to save a keystore buffer to the given path "dirname/filename".

If dirname and/or ato_akm_default_ksfile() are NULL then try to discover the default values from the config file else use the hard coded values provided by ato_akm_default_dir()/ato_akm_default_ksfile().

Parameters
ctxthe current thread local Context.
bufferthe buffer containing the raw keystore XML.
dirnamethe directory to save to
filenamethe keystore filename to save
Returns
ATO_ERR_OK if successful or error.