C_GetOperationState

C_GetOperationState obtains a copy of the cryptographic Operation State for a session, encoded as a string of Bytes. hSession is the session’s handle; pOperationState points to the location that receives the state; pulOperationStateLen points to the location that receives the length in bytes of the state.

SafeNet ProtectToolkit-C implements a subset of the full PKCS#11 specification – only the current Message Digest state and object attribute search state may be saved and restored. This means that the current encryption, decryption, signing and verification states are not saved by this function.

The state need not have been obtained from the same session (the “source session”) as it is being restored to (the “destination session”). However, the source session and destination session should have a common session state (e.g., CKS_RW_USER_FUNCTIONS), and should be with a common token. Message digest operation states may be carried across logins but not across different Cryptoki implementations.

Synopsis

C_GetOperationState(
        CK_SESSION_HANDLE hSession,
        CK_BYTE_PTR pOperationState,
        CK_ULONG_PTR pulOperationStateLen
); 

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.