Destroys an object.
CK_OBJECT_HANDLE hObject )
{
CK_OBJECT_HANDLE xPalHandle = CK_INVALID_HANDLE;
CK_BYTE_PTR pcLabel = NULL;
CK_ULONG xLabelLength = 0;
if( xPalHandle == CK_INVALID_HANDLE )
{
xResult = CKR_OBJECT_HANDLE_INVALID;
}
if( xResult == CKR_OK )
{
if( xResult == CKR_OK )
{
}
else
{
LogError( (
"Failed to destroy object. PKCS11_PAL_DestroyObject failed." ) );
}
}
else
{
LogError( (
"Failed to destroy object. The session was invalid." ) );
}
return xResult;
}
#define CK_DECLARE_FUNCTION(returnType, name)
Macro for defining a PKCS #11 functions.
Definition: core_pkcs11.h:77
#define LogError(message)
Macro that is called in the corePKCS11 library for logging "Error" level messages.
Definition: core_pkcs11_config_defaults.h:317
CK_RV C_DestroyObject(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hObject)
Destroys an object.
Definition: core_pkcs11_mbedtls.c:2954
static P11Session_t * prvSessionPointerFromHandle(CK_SESSION_HANDLE xSession)
Maps an opaque caller session handle into its internal state structure.
Definition: core_pkcs11_mbedtls.c:382
static void prvFindObjectInListByHandle(CK_OBJECT_HANDLE xAppHandle, CK_OBJECT_HANDLE_PTR pxPalHandle, CK_BYTE_PTR *ppcLabel, CK_ULONG_PTR pxLabelLength)
Looks up a PKCS #11 object's label and PAL handle given an application handle.
Definition: core_pkcs11_mbedtls.c:1112
static CK_RV prvCheckValidSessionAndModule(const P11Session_t *pxSession)
Helper to check if the current session is initialized and valid.
Definition: core_pkcs11_mbedtls.c:336
static CK_RV prvDeleteObjectFromList(CK_OBJECT_HANDLE xPalHandle)
Removes an object from the module object list (xP11Context.xObjectList)
Definition: core_pkcs11_mbedtls.c:1142
CK_RV PKCS11_PAL_DestroyObject(CK_OBJECT_HANDLE xHandle)
Delete an object from NVM.
Session structure.
Definition: core_pkcs11_mbedtls.c:299