Crypt-HSM
view release on metacpan or search on metacpan
include/pkcs11t.h view on Meta::CPAN
CK_VERSION firmwareVersion; /* version of firmware */
CK_CHAR utcTime[16]; /* time */
} CK_TOKEN_INFO;
/* The flags parameter is defined as follows:
* Bit Flag Mask Meaning
*/
#define CKF_RNG 0x00000001UL /* has random # generator */
#define CKF_WRITE_PROTECTED 0x00000002UL /* token is write-protected */
#define CKF_LOGIN_REQUIRED 0x00000004UL /* user must login */
#define CKF_USER_PIN_INITIALIZED 0x00000008UL /* normal user's PIN is set */
/* CKF_RESTORE_KEY_NOT_NEEDED. If it is set,
* that means that *every* time the state of cryptographic
* operations of a session is successfully saved, all keys
* needed to continue those operations are stored in the state
*/
#define CKF_RESTORE_KEY_NOT_NEEDED 0x00000020UL
/* CKF_CLOCK_ON_TOKEN. If it is set, that means
* that the token has some sort of clock. The time on that
* clock is returned in the token info structure
*/
#define CKF_CLOCK_ON_TOKEN 0x00000040UL
/* CKF_PROTECTED_AUTHENTICATION_PATH. If it is
* set, that means that there is some way for the user to login
* without sending a PIN through the Cryptoki library itself
*/
#define CKF_PROTECTED_AUTHENTICATION_PATH 0x00000100UL
/* CKF_DUAL_CRYPTO_OPERATIONS. If it is true,
* that means that a single session with the token can perform
* dual simultaneous cryptographic operations (digest and
* encrypt; decrypt and digest; sign and encrypt; and decrypt
* and sign)
*/
#define CKF_DUAL_CRYPTO_OPERATIONS 0x00000200UL
/* CKF_TOKEN_INITIALIZED. If it is true, the
* token has been initialized using C_InitializeToken or an
* equivalent mechanism outside the scope of PKCS #11.
* Calling C_InitializeToken when this flag is set will cause
* the token to be reinitialized.
*/
#define CKF_TOKEN_INITIALIZED 0x00000400UL
/* CKF_SECONDARY_AUTHENTICATION. If it is
* true, the token supports secondary authentication for
* private key objects.
*/
#define CKF_SECONDARY_AUTHENTICATION 0x00000800UL
/* CKF_USER_PIN_COUNT_LOW. If it is true, an
* incorrect user login PIN has been entered at least once
* since the last successful authentication.
*/
#define CKF_USER_PIN_COUNT_LOW 0x00010000UL
/* CKF_USER_PIN_FINAL_TRY. If it is true,
* supplying an incorrect user PIN will it to become locked.
*/
#define CKF_USER_PIN_FINAL_TRY 0x00020000UL
/* CKF_USER_PIN_LOCKED. If it is true, the
* user PIN has been locked. User login to the token is not
* possible.
*/
#define CKF_USER_PIN_LOCKED 0x00040000UL
/* CKF_USER_PIN_TO_BE_CHANGED. If it is true,
* the user PIN value is the default value set by token
* initialization or manufacturing, or the PIN has been
* expired by the card.
*/
#define CKF_USER_PIN_TO_BE_CHANGED 0x00080000UL
/* CKF_SO_PIN_COUNT_LOW. If it is true, an
* incorrect SO login PIN has been entered at least once since
* the last successful authentication.
*/
#define CKF_SO_PIN_COUNT_LOW 0x00100000UL
/* CKF_SO_PIN_FINAL_TRY. If it is true,
* supplying an incorrect SO PIN will it to become locked.
*/
#define CKF_SO_PIN_FINAL_TRY 0x00200000UL
/* CKF_SO_PIN_LOCKED. If it is true, the SO
* PIN has been locked. SO login to the token is not possible.
*/
#define CKF_SO_PIN_LOCKED 0x00400000UL
/* CKF_SO_PIN_TO_BE_CHANGED. If it is true,
* the SO PIN value is the default value set by token
* initialization or manufacturing, or the PIN has been
* expired by the card.
*/
#define CKF_SO_PIN_TO_BE_CHANGED 0x00800000UL
/* CKF_ERROR_STATE. If it is true, the token failed a FIPS 140
* self-test and entered an error state. */
#define CKF_ERROR_STATE 0x01000000UL
/*
* CKF_SEED_RANDOM_REQUIRED. If this is true the tokenâs
* random number generator must be seeded or re-seeded using
* C_SeedRandom. */
#define CKF_SEED_RANDOM_REQUIRED 0x02000000UL
/* CKF_ASYNC_SESSION_SUPPORTED. If this is true the token
* supports asynchronous sessions. */
#define CKF_ASYNC_SESSION_SUPPORTED 0x04000000UL
typedef CK_TOKEN_INFO CK_PTR CK_TOKEN_INFO_PTR;
/* CK_SESSION_HANDLE is a Cryptoki-assigned value that
* identifies a session
*/
typedef CK_ULONG CK_SESSION_HANDLE;
typedef CK_SESSION_HANDLE CK_PTR CK_SESSION_HANDLE_PTR;
/* CK_USER_TYPE enumerates the types of Cryptoki users */
typedef CK_ULONG CK_USER_TYPE;
/* Security Officer */
#define CKU_SO 0UL
/* Normal user */
#define CKU_USER 1UL
/* Context specific */
#define CKU_CONTEXT_SPECIFIC 2UL
/* CK_STATE enumerates the session states */
typedef CK_ULONG CK_STATE;
#define CKS_RO_PUBLIC_SESSION 0UL
#define CKS_RO_USER_FUNCTIONS 1UL
#define CKS_RW_PUBLIC_SESSION 2UL
#define CKS_RW_USER_FUNCTIONS 3UL
#define CKS_RW_SO_FUNCTIONS 4UL
/* CK_SESSION_INFO provides information about a session */
typedef struct CK_SESSION_INFO {
CK_SLOT_ID slotID;
CK_STATE state;
CK_FLAGS flags; /* see below */
CK_ULONG ulDeviceError; /* device-dependent error code */
} CK_SESSION_INFO;
( run in 0.680 second using v1.01-cache-2.11-cpan-39bf76dae61 )