PolFreeKey callback function

A Policy DLL's PolFreeKey callback function is called to enable the Policy DLL to return the storage that it previously allocated for key storage.

Syntax

POL_FREE_KEY PolFreeKey;

 

VOID

PolFreeKey(

    _In_  PVOID PolKey,

    _In_  DWORD PolKeySize

)

Parameters

PolKey [in]

A pointer to a key data storage area to be returned that was previously allocated by the Policy DLL.

PolKeySize [in]

The size, in bytes, of the key storage area.

Return value

(none)

Remarks

A Policy DLL's PolFreeKey callback function is called by FESF to allow the Policy DLL to deallocate space that it previously allocated for storage of key data information.  This key buffer was provided to FESF by the Policy DLL on return from the PolGetKeyNewFile or PolGetKeyFromHeader callback function.

This callback function is separate from the PolFreeHeader callback function to allow for different allocation and return methods for Header Data (which is presumably not security sensitive) and key information (which is presumably sensitive from a security standpoint).  In most Policy DLL implementations PolFreeKey would overwrite the key storage area with random data before freeing it. 

Policy DLLs must implement this callback function.

Examples

See Also

The FESF Sample Solution contains an example implementation of this callback function.  This example is part of the provided UM_Sample Visual Studio Solution, the SampPolicy project, and is located in the file SampPolicy.cpp.

Requirements

Software version

FESF V1 (or later)

Library

FESFPolicy.lib

Header

PolDllApi.h