C_InitToken

This function operates as specified in PKCS#11 but with these following extensions.  This function is disabled if the NoClearPINs flag is set in the Mode register.  Any attempt to call this function in this mode will result in a result in the CKR_ACCESS_DENIED error being returned. The Administrator must use the CT_ResetToken function instead.

The “protected authentication path” is not applicable to this module.

The module will detect if a session is active on the token and, if so, return CKR_SESSION_EXISTS.

If the token has been already initialized and the module is not in Entrust-ready modes then the supplied pin is checked against the current SO pin.  If the pin is correct, the token is wiped and the label is set (the SO pin is not changed).

If the token is currently uninitialized, or the module is in Entrust-ready mode, the token is wiped, and the new label and SO pin are set.

The Admin token may not be re-initialized, this function will return CKR_SLOT_ID_INVALID if the specified slot id is the admin token.

Synopsis

C_InitToken(
        CK_SLOT_ID slotID,
        CK_CHAR_PTR pPin,
        CK_ULONG ulPinLen,
        CK_CHAR_PTR pLabel
); 

Operation in WLD Mode

When SafeNet ProtectToolkit is configured to operate in WLD mode, this function is not supported and will return the error CKR_FUNCTION_NOT_SUPPORTED.