Skip to content

Latest commit

 

History

History
137 lines (87 loc) · 5.83 KB

nf-wincrypt-cryptenumkeyidentifierproperties.md

File metadata and controls

137 lines (87 loc) · 5.83 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:wincrypt.CryptEnumKeyIdentifierProperties
CryptEnumKeyIdentifierProperties function (wincrypt.h)
The CryptEnumKeyIdentifierProperties function enumerates key identifiers and their properties.
CryptEnumKeyIdentifierProperties
CryptEnumKeyIdentifierProperties function [Security]
_crypto2_cryptenumkeyidentifierproperties
security.cryptenumkeyidentifierproperties
wincrypt/CryptEnumKeyIdentifierProperties
security\cryptenumkeyidentifierproperties.htm
security
6e57d935-4cfb-44af-b1c6-6c399c959452
12/05/2018
CryptEnumKeyIdentifierProperties, CryptEnumKeyIdentifierProperties function [Security], _crypto2_cryptenumkeyidentifierproperties, security.cryptenumkeyidentifierproperties, wincrypt/CryptEnumKeyIdentifierProperties
wincrypt.h
Windows
Windows XP [desktop apps only]
Windows Server 2003 [desktop apps only]
Crypt32.lib
Crypt32.dll
Windows
19H1
CryptEnumKeyIdentifierProperties
wincrypt/CryptEnumKeyIdentifierProperties
c++
APIRef
kbSyntax
DllExport
Crypt32.dll
CryptEnumKeyIdentifierProperties

CryptEnumKeyIdentifierProperties function

-description

Important  This API is deprecated. New and existing software should start using Cryptography Next Generation APIs. Microsoft may remove this API in future releases.
 
The CryptEnumKeyIdentifierProperties function enumerates key identifiers and their properties. This function is not called in a loop. Rather, it loops internally until the last key identifier property is enumerated or the callback function returns FALSE. If dwPropId is zero or if the properties of the key identifier match the dwPropId, the callback function is called.

-parameters

-param pKeyIdentifier [in, optional]

A pointer to a CRYPT_HASH_BLOB structure that contains the key identifier.

If pKeyIdentifier is NULL, the function enumerates all key identifiers.

If pKeyIdentifier is not NULL, the callback function pfnEnum is only called for the specified key identifier.

-param dwPropId [in]

Indicates the property identifier to be listed.

If dwPropId is set to zero, this function calls the callback function with all the properties.

If dwPropId is not zero and pKeyIdentifier is NULL, the callback function is called only for those key identifiers that have the specified property (sets the cProp parameter of pfnEnum to one). All key identifiers that do not have the property are skipped.

Any certificate property identifier can be used.

-param dwFlags [in]

By default, the list of key identifiers for the CurrentUser is searched. If CRYPT_KEYID_MACHINE_FLAG is set, the list of key identifiers of the LocalMachine (if pwszComputerName is NULL) or of a remote computer (if pwszComputerName is not NULL) is searched. For more information, see pwszComputerName.

-param pwszComputerName [in, optional]

A pointer to the name of a remote computer to be searched. If CRYPT_KEYID_MACHINE_FLAG is set in dwFlags, the remote computer is searched for a list of key identifiers. If the local computer is to be searched and not a remote computer, pwszComputerName is set to NULL.

-param pvReserved [in]

Reserved for future use and must be NULL.

-param pvArg [in, optional]

A pointer to data to be passed to the callback function. The type is a void that allows the application to declare, define, and initialize a structure or argument to hold any information.

-param pfnEnum [in]

A pointer to an application-defined callback function that is executed for each key identifier entry that matches the input parameters. For details about the callback functions parameters, see CRYPT_ENUM_KEYID_PROP.

-returns

The CryptEnumKeyIdentifierProperties function repeatedly calls the CRYPT_ENUM_KEYID_PROP callback function until the last key identifier is enumerated or the callback function returns FALSE.

If the main function succeeds, the function returns nonzero (TRUE).

If the function fails, it returns zero (FALSE). For extended error information, call GetLastError.

To continue enumeration, the function returns TRUE.

To stop enumeration, the function returns FALSE and sets the last error code.

-remarks

A key identifier can have the same properties as a certificate context.

Examples

For an example that uses this function, see Example C Program: Working with Key Identifiers.

-see-also

Base Cryptography Functions

CryptGetKeyIdentifierProperty

CryptSetKeyIdentifierProperty