The handle that describes the module to performthis operation.
AccessCred (input/optional)
If the target key referenced by KeyPtr isprotected and Delete has the value CSSM_TRUE, thisparameter must contain the certificates and samples required toaccess the target key. The certificates must be presented as immediatevalues in the input structure. The samples can be immediate values,be obtained through a protected mechanism, or be obtained througha callback function.
KeyPtr (input)
The key whose associated keying material can bediscarded at this time.
Delete (input)
If this value is CSSM_TRUE, the key data in thekey structure will be removed and any internal storage related tothat key will also be removed. In this case the key no longer existsin any form, unless previously wrapped out of the CSP by the application.If this value is CSSM_FALSE, then only the resources related tothe key structure are released. The key may still be accessibleby other means internally to the CSP.
DESCRIPTIONThis function requests the Cryptographic Service Providerto clean up any key material associated with the key, and to possiblydelete the key from the CSP completely. This function also releasesthe internal storage referenced by the KeyData field of the keystructure, which can hold the actual key value. The key reference by KeyPtr canbe a persistent key or a transient key. This function clears thecached copy of the key and can have an effect on the long term persistenceor transience of the key. RETURN VALUEA CSSM_RETURN value indicating success or specifying a particularerror condition. The value CSSM_OK indicates success. All othervalues represent an error condition. ERRORSErrors are described in the CDSA Technical Standard.