FM_GetTokenAppUserData

This function is used to obtain the userData associated with the specified token in the application context. If there are no associated buffers, or if the token is not present, NULL is returned in ppUserData.

Synopsis

#include <objstate.h>
CK_RV FM_GetTokenAppUserData(FmNumber_t fmNo,
CK_SLOTID slotId,
CK_VOID_PTR_PTR ppUserData);
Parameter Description
fmNo The fm number of the caller. It must be FM_NUMBER_CUSTOM_FM in this release of the software.
slotId The slot ID of the slot containing the token.
ppuserData Address of a variable (of type CK_VOID_PTR) which will contain the address of the user data if this function returns CKR_OK. It must be non-NULL.

Return Code

CKR_OK: The operation was successful.

CKR_ARGUMENTS_BAD: ppUserData was NULL or fmNo was not FM_NUMBER_CUSTOM_FM.

CKR_SLOT_ID_INVALID: The specified slot ID is invalid.

CKR_CRYPTOKI_NOT_INITIALIZED: Cryptoki is not yet initialized.