CryptRegisterOIDInfo function (wincrypt.h)
The CryptRegisterOIDInfo function registers the OID information specified in the CRYPT_OID_INFO structure, persisting it to the registry.
Crypt32.dll contains predefined information for the commonly known OIDs. This function allows applications to augment the predefined OID information. During CryptRegisterOIDInfo's first call, the registered OID information is installed.
When expanding the tables using CryptRegisterOIDInfo, the new entries can be placed either before or after predefined entries, controlled by dwFlags. The placement of registered OID information affects the result of CryptFindOIDInfo because the tables are searched in order. First registered entries placed before the predefined entries are checked, then the predefined entries are checked, and finally, registered entries placed after the predefined entries are checked. The first match found is returned. A newly registered entry placed before the predefined entries can override one of the predefined entries.
Syntax
BOOL CryptRegisterOIDInfo(
[in] PCCRYPT_OID_INFO pInfo,
[in] DWORD dwFlags
);
Parameters
[in] pInfo
A pointer to a CRYPT_OID_INFO structure with the OID information to register. Specify the group that the OID information is to be registered for by setting the dwGroupId member of the structure.
When registering OID information for Suite B algorithms implemented with Cryptography API: Next Generation (CNG), you must set the Algid member of the CRYPT_OID_INFO structure to CALG_OID_INFO_CNG_ONLY (0xFFFFFFFF).
[in] dwFlags
By default, the registered OID information is installed after Crypt32.dll's OID entries. If CRYPT_INSTALL_OID_INFO_BEFORE_FLAG is set, new OID information is install before Crypt32.dll's entries.
Return value
If the function succeeds, the return value is nonzero (TRUE).
If the function fails, the return value is zero (FALSE).
Remarks
When you have finished using the OID information, unregister it by calling the CryptUnregisterOIDInfo function.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | wincrypt.h |
Library | Crypt32.lib |
DLL | Crypt32.dll |