Name

FC_GetTokenInfo - obtain information about a particular token in the system.

Syntax

CK_RV FC_GetTokenInfo(CK_SLOT_ID slotID, CK_TOKEN_INFO_PTR pInfo);

Parameters

FC_GetTokenInfo has two parameters:

slotID
the ID of the token's slot
pInfo
points to a CK_TOKEN_INFO structure

Description

FC_GetTokenInfo returns information about the token in the specified slot. On return, the CK_TOKEN_INFO structure that pInfo points to has the following information:

A user may call FC_GetTokenInfo without logging into the token (to assume the NSS User role).

Return value

CKR_OK
Token information was successfully copied.
CKR_CRYPTOKI_NOT_INITIALIZED
The PKCS #11 module library is not initialized.
CKR_SLOT_ID_INVALID
The specified slot number is out of the defined range of values.

FC_GetTokenInfo should return CKR_ARGUMENTS_BAD if pInfo is NULL.

Examples

Note the use of the %.32s format string to print the label and manufacturerID members of the CK_TOKEN_INFO structure.

See also