The CertSetCTLContextProperty function sets a property for the specified CTL context.
#include <wincrypt.h>
BOOL WINAPI CertSetCTLContextProperty(
PCCTL_CONTEXT pCtlContext, // in
DWORD dwPropId, // in
DWORD dwFlags, // in
void *pvData // in
);
Property ID type | Definition |
---|---|
CERT_NEXT_UPDATE_ LOCATION_PROP_ID |
Typiclly, this property is implicitly set by a call to CertGetCTLContextProperty. pvData points to a CRYPT_DATA_BLOB containing an ASN_1 encoded CERT_ENHKEY_USAGE (encoded via CryptEncodeObject( X509_ENHANCED_KEY_USAGE)) |
For all the other PROP_IDs, pvData points to an encoded CRYPT_DATA_BLOB.
Important Setting pvData to NULL deletes the property.
TRUE if the function succeeded. FALSE if the function failed.
Call GetLastError to see the reason for any failures. This function has the following error codes:
Error code | Description |
---|---|
E_INVALIDARG | Invalid property ID. See CertSetCertificateContextProperty for details. |
If the property already exists, then, the old value is deleted and replaced.
See CertSetCertificateContextProperty.
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.