Previous section.

Common Security: CDSA and CSSM
Copyright © 1997 The Open Group

NAME

CSP_FreeKey

SYNOPSIS

CSSM_RETURN CSSMAPI CSP_FreeKey
    (CSSM_CSP_HANDLE CSPHandle,
    CSSM_KEY_PTR KeyPtr)

DESCRIPTION

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.

PARAMETERS

CSPHandle (input)

The handle that describes the module to perform this operation.

PublicKey (input)

The key whose associated keying material can be discarded at this time.

RETURN VALUE

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.

ERRORS

CSSM_INVALID_KEY

Key not recognized by this CSP

CSSM_CSP_MEMORY_ERROR

Internal memory error

CSSM_FUNCTION_NOT_IMPLEMENTED

Function not implemented


Why not acquire a nicely bound hard copy?
Click here to return to the publication details or order a copy of this publication.
You should also read the legal notice explaining the terms and conditions relating to the CDSA documentation.

Contents Next section Index