CT_ResetToken

This function is a SafeNet extension to PKCS#11, it will erase (reset) the token which the session is connected to.

The session must be in RW SO Mode for this function to succeed otherwise
CKR_USER_NOT_LOGGED_IN is returned.

This function allows Token Security Officers to reset a Token. The module will detect if other sessions are active on the token and, if so, return CKR_SESSION_EXISTS.

This function will erase all objects it can from the token – depending on the token type some objects will no be erased. The token is left in an initialized state where the SO pin and label are set as specified by the pPin and pLabel parameters.

NOTE   pPin becomes the new SO pin and need not match the old SO pin value. The session is automatically terminated by this call.

Synopsis

CT_ResetToken(
        CK_SESSION_HANDLE hSession,
        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 returns the error CKR_FUNCTION_NOT_SUPPORTED.