CSSM_FreeKey
CSSM_RETURN CSSMAPI CSSM_FreeKey
(CSSM_CSP_HANDLE CSPHandle,
CSSM_KEY_PTR KeyPtr)
This function requests the cryptographic service provider to clean up any key material associated with the key. This function also releases the internal storage referenced by the KeyData field of the key structure, which can hold the actual key value. The key reference by KeyPtr can be a persistent key or a transient key. This function clears the cached copy of the key and has no effect on the long term persistence or transience of the key.
- CSPHandle (input)
The handle that describes the module to perform this operation.
- KeyPtr (input)
The key whose associated keying material can be discarded at this time.
A CSSM return value. This function returns CSSM_OK if successful, and returns an error code if an error has occurred. Use CSSM_GetError to obtain the error code.
- CSSM_INVALID_KEY
Key not recognized by this CSP.
- CSSM_CSP_MEMORY_ERROR
Internal memory error.
- CSSM_FUNCTION_NOT_IMPLEMENTED
Function not implemented.
Contents | Next section | Index |