CryptFindOIDInfo (Compact 2013)
3/28/2014
This function retrieves the first predefined or registered CRYPT_OID_INFO structure matching a specified key type and key. The search can be limited to object identifiers (OID) within a specified OID group.
Use the CryptEnumOIDInfo function to list all or selected subsets of CRYPT_OID_INFO structures.
New OIDs can be placed in the list of registered OIDs either before or after the predefined entries. Because the CryptFindOIDInfo function returns the first key on the list that matches the search criteria, a newly registered OID placed before a predefined OID entry with the same key overrides a predefined entry.
Syntax
PCCRYPT_OID_INFO WINAPI CryptFindOIDInfo(
DWORD dwKeyType,
void* pvKey,
DWORD dwGroupId
);
Parameters
dwKeyType
[in] Specifies the key type to use when finding OID information.The following table shows currently defined key types and the associated value of pvKey.
Key type
Type of pvKey
CRYPT_OID_INFO_OID_KEY
The pvKey parameter points to a szOID.
CRYPT_OID_INFO_NAME_KEY
The pvKey parameter points to a pwszName.
CRYPT_OID_INFO_ALGID_KEY
ThepvKey parameter points to an ALG_ID.
CRYPT_OID_INFO_SIGN_KEY
The pvKey parameter points to an array of two ALG_IDs where:
ALG_ID[0] is the hash AlgId.
ALG_ID[1] is the public key AlgId.
- pvKey
[in] Value that depends on the value of the dwKeyType parameter. For more information, see the table in the description for the dwKeyType parameter.
dwGroupId
[in] Specifies the group identifier to use when finding OID information. Setting dwGroupId to zero searches all groups according to the value of the dwKeyType parameter. Otherwise, only the dwGroupId indicated is searched.See CryptEnumOIDInfo for code that lists the OID information by group identifier.
Return Value
Returns a pointer to a constant structure of the CRYPT_OID_INFO type. The returned pointer must not be freed. NULL is returned when the specified key and group is not found.
Requirements
Header |
wincrypt.h |
Library |
crypt32.lib |
See Also
Reference
Certificates Functions
CryptEnumOIDInfo
ALG_ID
CRYPT_ALGORITHM_IDENTIFIER
CRYPT_OID_INFO