Token Information
CK_TOKEN_INFO provides information about a token. This structure is set by the C_GetTokenInfo entry point.
It is defined as follows:
typedef struct CK_TOKEN_INFO {
CK_UTF8CHAR label[32];
CK_UTF8CHAR manufacturerID[32];
CK_UTF8CHAR model[16];
CK_CHAR serialNumber[16];
CK_FLAGS flags;
CK_ULONG ulMaxSessionCount;
CK_ULONG ulSessionCount;
CK_ULONG ulMaxRwSessionCount;
CK_ULONG ulRwSessionCount;
CK_ULONG ulMaxPinLen;
CK_ULONG ulMinPinLen;
CK_ULONG ulTotalPublicMemory;
CK_ULONG ulFreePublicMemory;
CK_ULONG ulTotalPrivateMemory;
CK_ULONG ulFreePrivateMemory;
CK_VERSION hardwareVersion;
CK_VERSION firmwareVersion;
CK_CHAR utcTime[16];
} CK_TOKEN_INFO;
The fields of the structure have the following meanings:
| Field | Meaning | Value |
|---|---|---|
| Label | application-defined label | “HID Global ActivClient X”, where X is the slot number, i.e. if only one slot is available, X equals 0. |
| manufacturerID | Name of the card manufacturer | This value is card dependent. |
| Model | Card Model |
This value is card dependent. |
| serialNumber | Cad Serial Number (its CUID or IIN/CIN field) | This value is card dependent. |
| Flags | See below. | See CK_TOKEN_INFO Flags Definition |
| ulMaxSessionCount | maximum number of sessions that can be opened with the token at one time by a single application | CKA_EFFECTIVELY_INFINITE |
| ulSessionCount | number of sessions that this application currently has open with the token | Integer between [0, infinite] |
| ulMaxRwSessionCount | maximum number of read/write sessions that can be opened with the token at one time by a single application | CKA_EFFECTIVELY_INFINITE |
| ulRwSessionCount | number of read/write sessions that this application currently has open with the token | Integer between [0, infinite] |
| ulMaxPinLen | Maximum PIN Length | This value is profile dependent |
| ulMinPinLen | Minimum PIN Length | This value is profile dependent |
| ulTotalPublicMemory | the total amount of memory on the token in bytes in which public objects may be stored | CK_UNAVAILABLE_INFORMATION (defined as 0) |
| ulFreePublicMemory | the amount of free (unused) memory on the token in bytes for public objects | CK_UNAVAILABLE_INFORMATION (defined as 0) |
| ulTotalPrivateMemory | the total amount of memory on the token in bytes in which private objects may be stored | CK_UNAVAILABLE_INFORMATION (defined as 0) |
| ulFreePrivateMemory | the amount of free (unused) memory on the token in bytes for private objects | CK_UNAVAILABLE_INFORMATION (defined as 0) |
| hardwareVersion | version number of the hardware* | 1.0 |
| firmwareVersion | version number of the firmware* | 1.0 |
| Utctime | Current Time | Meaningless so empty string. |
|
*hardwareVersion, firmwareVersion are hardcoded. |
||