The CryptRegisterOIDInfo function registers the OID information specified in the CRYPT_OID_INFO structure, persisting it to the registry.
The crypt32.dll contains information for the commonly known OIDs. This function allows applications to augment crypt32.dll's OID information. During CryptFindOIDInfo'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 the predefined entries. It is controlled by CryptRegisterOIDInfo (dwFlags). The placement of registered OID information may affect the result of CryptFindOIDInfo, since the tables are searched such that registered entries placed before the predefined entries are checked first for a match, then the predefined entries are checked, and finally, registered entries placed after the predefined entries are checked. The first match found is returned. So, if a registered entry placed before the predefined entries overrides one of the predefined entries, it will be returned from CryptFindOIDInfo when it matches the find criteria (the specified key and group).
#include <wincrypt.h>
BOOL WINAPI CryptRegisterOIDInfo(
PCCRYPT_OID_INFO pInfo, // in
DWORD dwFlags // in
);
By default the registered OID information is installed after crypt32.dll's OID entries. Set the CRYPT_INSTALL_OID_INFO_BEFORE_FLAG to install before them.
TRUE if the function succeeded. FALSE if the function failed.
Call GetLastError to see the reason for any failures.
Windows NT: Requires version 4.0 SP3 or later. Available also in IE 3.02 and later.
Windows: Requires Windows 98 (or Windows 95 with IE 3.02 or later).
Windows CE: Unsupported.
Header: Declared in wincrypt.h.
Import Library: Use crypt32.lib.
ALG_ID,
CRYPT_ALGORITHM_IDENTIFIER,
CRYPT_OID_INFO,
CryptFindOIDInfo,
CryptUnregisterOIDInfo,
CRYPT_HASH_ALG_OID_GROUP_ID,
CRYPT_ENCRYPT_ALG_OID_GROUP_ID,
CRYPT_PUBKEY_ALG_OID_GROUP_ID,
CRYPT_SIGN_ALG_OID_GROUP_ID,
CRYPT_RDN_ATTR_OID_GROUP_ID,
CRYPT_EXT_OR_ATTR_OID_GROUP_ID,
CRYPT_ENHKEY_USAGE_OID_GROUP_ID,
CRYPT_POLICY_OID_GROUP_ID