corePKCS11  V3.0.0
PKCS #11 Cryptoki Library
C_FindObjectsFinal
CK_DECLARE_FUNCTION( CK_RV, C_FindObjectsFinal )( CK_SESSION_HANDLE hSession )
{
P11Session_t * pxSession = prvSessionPointerFromHandle( hSession );
CK_RV xResult = prvCheckValidSessionAndModule( pxSession );
/*
* Check parameters.
*/
if( xResult == CKR_OK )
{
if( pxSession->pxFindObjectLabel == NULL )
{
LogError( ( "Failed to end find objects operation. Find operation "
"must be initialized." ) );
xResult = CKR_OPERATION_NOT_INITIALIZED;
}
}
if( xResult == CKR_OK )
{
/*
* Clean-up find objects state.
*/
mbedtls_free( pxSession->pxFindObjectLabel );
pxSession->pxFindObjectLabel = NULL;
pxSession->xFindObjectLabelLen = 0;
}
return xResult;
}
CK_DECLARE_FUNCTION
#define CK_DECLARE_FUNCTION(returnType, name)
Macro for defining a PKCS #11 functions.
Definition: core_pkcs11.h:72