parallel function management functions (2 functions) In addition to these 68 functions in the Cryptoki Version 2.1 API proper, Cryptoki can use application-supplied callback functions to notify an application of certain events, and can also use application-supplied functions to handle mutex objects for safe multi-threaded library access.
Execution of a Cryptoki function call is in general an all-or-nothing affair, i.e., a function call accomplishes either its entire goal, or nothing at all.
If a Cryptoki function executes successfully, it returns the value CKR_OK.
If a Cryptoki function does not execute successfully, it returns some value other than CKR_OK, and the token is in the same state as it was in prior to the function call. If the function call was supposed to modify the contents of certain memory addresses on the host computer, these memory addresses may have been modified, despite the failure of the function.
In unusual (and extremely unpleasant!) circumstances, a function can fail with the return value CKR_GENERAL_ERROR. When this happens, the token and/or host computer may be in an inconsistent state, and the goals of the function may have been partially achieved. There are a small number of Cryptoki functions whose return values do not behave precisely as described above; these exceptions are documented individually with the description of the functions themselves.