Initializes Cryptoki.
{
CK_RV xResult = CKR_OK;
( void ) ( pInitArgs );
{
if( xResult == CKR_OK )
{
}
else
{
LogError( (
"Failed to initialize PKCS #11. PAL failed with error code: 0x%0lX", (
unsigned long int ) xResult ) );
}
}
else
{
xResult = CKR_CRYPTOKI_ALREADY_INITIALIZED;
LogWarn( (
"Failed to initialize PKCS #11. PKCS #11 was already initialized." ) );
}
if( xResult == CKR_OK )
{
LogInfo( (
"PKCS #11 successfully initialized." ) );
}
return xResult;
}
- Note
- C_Initialize is not thread-safe.
C_Initialize should be called (and allowed to return) before any additional PKCS #11 operations are invoked.
In this implementation, all arguments are ignored. Thread protection for the rest of PKCS #11 functions default to FreeRTOS primitives.
- Parameters
-
[in] | pInitArgs | This parameter is ignored. |
- Returns
- CKR_OK if successful. CKR_CRYPTOKI_ALREADY_INITIALIZED if C_Initialize was previously called. All other errors indicate that the PKCS #11 module is not ready to be used.