Library /sys$common/syshlp/helplib.hlb  —  CDSA  CDSA_API, FreeKey
 NAME
   FreeKey, CSSM_FreeKey, CSP_FreeKey - Clean up keys (CDSA)

 SYNOPSIS
   # include <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 CSPHandle,
        const CSSM_ACCESS_CREDENTIALS *AccessCred,
        CSSM_KEY_PTR KeyPtr,
        CSSM_BOOL Delete)

 LIBRARY
   Common Security Services Manager library (CDSA$INCSSM300_SHR.EXE)

 PARAMETERS
   CSPHandle (input)
           The handle that describes the module to perform this
           operation.

   AccessCred (input/optional)
           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 immediate values,
           be obtained through a protected mechanism, or be obtained
           through a callback function.

   KeyPtr (input)
           The key whose associated keying material can be discarded
           at this time.

   Delete (input)
           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 accessible 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
   persistent 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 transience 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 represent an error condition.

 ERRORS
   Errors are described in the CDSA technical standard.  See CDSA.

   None specific to this call.

 SEE ALSO
   Books

   Intel CDSA Application Developer's Guide (see CDSA)

   Other Help Topics
Close Help