FreeKey(3)FreeKey(3)NAME
FreeKey, CSSM_FreeKey, CSP_FreeKey - Clean up keys (CDSA)
SYNOPSIS
# include <cdsa/cssm.h>
API: CSSM_RETURN CSSMAPI CSSM_FreeKey (CSSM_CSP_HANDLE CSPHandle, const
CSSM_ACCESS_CREDENTIALS *AccessCred, CSSM_KEY_PTR KeyPtr, CSSM_BOOL
Delete) SPI: CSSM_RETURN CSSMCSPI CSP_FreeKey (CSSM_CSP_HANDLE CSPHan‐
dle, const CSSM_ACCESS_CREDENTIALS *AccessCred, CSSM_KEY_PTR KeyPtr,
CSSM_BOOL Delete)
LIBRARY
Common Security Services Manager library (libcssm.so)
PARAMETERS
The handle that describes the module to perform this operation. If the
target key referenced by KeyPtr is protected and Delete has the value
CSSM_TRUE, this parameter must contain the certificates and samples
required to access the target key. The certificates must be presented
as immediate values in the input structure. The samples can be immedi‐
ate values, be obtained through a protected mechanism, or be obtained
through a callback function. The key whose associated keying material
can be discarded at this time. If this value is CSSM_TRUE, the key
data in the key structure will be removed and any internal storage
related to that key will also be removed. In this case the key no
longer exists in any form, unless previously wrapped out of the CSP by
the application. If this value is CSSM_FALSE, then only the resources
related to the key structure are released. The key may still be acces‐
sible by other means internally to the CSP.
DESCRIPTION
This function requests the cryptographic service provider to clean up
any key material associated with the key, and to possibly delete the
key from the CSP completely. 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 per‐
sistent key or a transient key. This function clears the cached copy of
the key and can have an effect on the long term persistence or tran‐
sience of the key.
RETURN VALUE
A CSSM_RETURN value indicating success or specifying a particular error
condition. The value CSSM_OK indicates success. All other values repre‐
sent an error condition.
ERRORS
Errors are described in the CDSA technical standard. See
CDSA_intro(3).
None specific to this call.
SEE ALSO
Books
Intel CDSA Application Developer's Guide (see CDSA_intro(3))
Reference Pages
FreeKey(3)