corePKCS11  V3.0.0
PKCS #11 Cryptoki Library
C_DestroyObject
CK_DECLARE_FUNCTION( CK_RV, C_DestroyObject )( CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hObject )
{
const P11Session_t * pxSession = prvSessionPointerFromHandle( hSession );
CK_RV xResult = prvCheckValidSessionAndModule( pxSession );
if( ( hObject < 1UL ) || ( hObject > pkcs11configMAX_NUM_OBJECTS ) )
{
xResult = CKR_OBJECT_HANDLE_INVALID;
}
if( xResult == CKR_OK )
{
xResult = PKCS11_PAL_DestroyObject( hObject );
LogDebug( ( "PKCS11_PAL_DestroyObject returned 0x%0lX", ( unsigned long int ) xResult ) );
}
else
{
LogError( ( "Failed to destroy object. The session was invalid." ) );
}
return xResult;
}
PKCS11_PAL_DestroyObject
CK_RV PKCS11_PAL_DestroyObject(CK_OBJECT_HANDLE xHandle)
Delete an object from NVM.
CK_DECLARE_FUNCTION
#define CK_DECLARE_FUNCTION(returnType, name)
Macro for defining a PKCS #11 functions.
Definition: core_pkcs11.h:72