CryptSetKeyIdentifierProperty function
The CryptSetKeyIdentifierProperty function sets the property of a specified key identifier. This function can set the property on the computer identified in pwszComputerName.
Syntax
BOOL WINAPI CryptSetKeyIdentifierProperty( _In_ const CRYPT_HASH_BLOB *pKeyIdentifier, _In_ DWORD dwPropId, _In_ DWORD dwFlags, _In_ LPCWSTR pwszComputerName, _In_ void *pvReserved, _Out_ const void *pvData );
Parameters
- pKeyIdentifier [in]
-
A pointer to a CRYPT_HASH_BLOB containing the key identifier.
- dwPropId [in]
-
Identifies the property to be set. The value of dwPropId determines the type and content of the pvData parameter. Any certificate property ID can be used. CERT_KEY_PROV_INFO_PROP_ID is the property of most interest.
- dwFlags [in]
-
The following flags can be set. They can be combined with a bitwise-OR operation.
- pwszComputerName [in]
-
A pointer to a null-terminated string that contains the name of a remote computer that has the key identifier where the properties are set. If CRYPT_KEYID_MACHINE_FLAG flag is set, searches the remote computer for a list of key identifiers. If the local computer is to be set and not a remote computer, set pwszComputerName to NULL.
- pvReserved [in]
-
Reserved for future use and must be NULL.
- pvData [out]
-
If dwPropId is CERT_KEY_PROV_INFO_PROP_ID, pvData points to a CRYPT_KEY_PROV_INFO structure containing the property of the key identifier.
If dwPropId is not CERT_KEY_PROV_INFO_PROP_ID, pvData points to a CRYPT_DATA_BLOB structure containing the property of the key identifier.
Setting pvData to NULL deletes the property.
Return value
If the function succeeds, the return value is nonzero (TRUE).
If the function fails, the return value is zero (FALSE). For extended error information, call GetLastError.
Examples
For an example that uses this function, see Example C Program: Working with Key Identifiers.
Requirements
|
Minimum supported client |
Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also