CertSetCRLContextProperty

The CertSetCRLContextProperty function sets a property for the specified CRL context.

#include <wincrypt.h>
BOOL WINAPI CertSetCRLContextProperty(
  PCCRL_CONTEXT pCrlContext,    // in
  DWORD dwPropId,               // in
  DWORD dwFlags,                // in
  void *pvData                  // in
);
 

Parameters

pCrlContext
Pointer to the CRL context.
dwPropId
See CertSetCertificateContextProperty for the complete list of defined IDs. Normally only the following properties will be set:
CERT_HASH_PROP_ID, CERT_SHA1_HASH_PROP_ID or CERT_HASH_MD5_PROP_ID
This property is normally implicitly set by a call to CertGetCRLContextProperty. pvData points to a CRYPT_HASH_BLOB.
CERT_SIGNATURE_HASH_PROP_ID
If the hash does not exist, it is computed with CryptHashToBeSigned. pvData points to the existing or computed hash. Normally the length of the hash is 20 bytes for SHA and 16 for MD5.

For all the other PROP_IDs, pvData points to an encoded CRYPT_DATA_BLOB.

dwFlags
See CertSetCertificateContextProperty for details about setting flags.
pvData
Pointer to a data type that is determined by the value passed in dwPropId.

Important  For all values of pwPropId, setting pvData to NULL deletes the property.

Return Values

TRUE if the function succeeded. FALSE if the function failed.

GetLastError may be called to indicate the reason for any failure. This function uses the following error code:

E_INVALIDARG
Invalid property. The ID specified was greater than 0x0000FFFF, or, for the CERT_KEY_CONTEXT_PROP_ID property, an invalid cbSize in the CERT_KEY_CONTEXT structure was specified.

Remarks

If a property already exists, the old value is replaced.

Example

See CertSetCertificateContextProperty.

QuickInfo

  Windows NT: Requires version 4.0 SP3 or later. Available also in IE 3.02 and later.
  Windows: Requires Windows 95 OSR2 or later.
  Windows CE: Unsupported.
  Header: Declared in wincrypt.h.
  Import Library: Use crypt32.lib.