CryptEnumOIDFunction
The CryptEnumOIDFunction function enumerates the OID functions identified by their encoding type, function name, and OID. pfnEnumOIDFunc is called for each OID function matching the input parameters.
#include <wincrypt.h>
BOOL WINAPI CryptEnumOIDFunction(
DWORD dwEncodingType, // in
LPCSTR pszFuncName, // in, optional
LPCSTR pszOID, // in, optional
DWORD dwFlags, // in
void *pvArg, // in
PFN_CRYPT_ENUM_OID_FUNC pfnEnumOIDFunc // in
);
Parameters
-
dwEncodingType
-
Type of encoding specified. Setting this parameter to CRYPT_MATCH_ANY_ENCODING_TYPE matches any encoding type. Note that if CRYPT_MATCH_ANY_ENCODING_TYPE is not specified, then either a certificate or message encoding type is required. If the low-order word containing the certificate encoding type is nonzero, then it is used. Otherwise, the high-order word containing the message encoding type is used. If both are specified, the certificate encoding type in the low-order word is used.
Currently defined encoding types are shown in the following table:
Encoding type |
Value |
None |
0x00000000 |
CRYPT_ASN_ENCODING |
0x00000001 |
X509_ASN_ENCODING |
0x00000001 |
PKCS_7_ASN_ENCODING |
0x00010000 |
CRYPT_MATCH_ANY_ENCODING_TYPE |
0xFFFFFFFF |
-
pszFuncName
-
Name of the function for which a case insensitive match search is performed. Setting this parameter to NULL results in a match being found for any function name.
-
pszOID
-
If the high-order word of pszOID is non-zero, pszOID specifies the object identifier for which a case insensitive match search is performed. If the high-order word of pszOID is zero, pszOID is used to match a numeric object identifier. Setting this parameter to NULL matches any object identifier. Setting this parameter to CRYPT_DEFAULT_OID restricts the enumeration to only the DEFAULT functions.
-
dwFlags
-
Flag values. This parameter is reserved for future use and should be set to zero in the interim.
-
pvArg
-
Pointer to arguments that are passed through to the callback function.
-
pfnEnumOIDFunc
-
Callback function that is executed for each OID function matching the input parameters. See "Remarks" for details on the callback typedef.
Return Values
TRUE if the function succeeded. FALSE if the function failed.
Call GetLastError to see the reason for any failures.
Remarks
The following typedef structure applies to pfnEnumOIDFunc.
typedef BOOL (WINAPI *PFN_CRYPT_ENUM_OID_FUNC)(
IN DWORD dwEncodingType,
IN LPCSTR pszFuncName,
IN LPCSTR pszOID,
IN DWORD cValue,
IN const DWORD rgdwValueType[],
IN LPCWSTR const rgpwszValueName[],
IN const BYTE * const rgpbValueData[],
IN const DWORD rgcbValueData[],
IN void *pvArg
);
Members
-
dwEncodingType
-
See the above description for dwEncodingType.
-
pszFuncName
-
Name of the OID function.
-
pszOID
-
pszOID is a pointer to either an OID string, such as "2.5.29.1", an ASCII string, such as "file", or a numeric string, such as #2000.
-
cValue
-
Count of elements in the array of value types.
-
rgdwValueType[]
-
Array of value types. Each entry in the array will be one of the value types listed for CryptGetOIDFunctionValue under pdwValueType.
-
rgpwszValueName[]
-
Array of null-terminated strings containing the name of the value.
-
rgpbValueData[]
-
Array that contains the values corresponding to the names in the rgpwszValueName array elements.
-
rgcbValueData[]
-
Array that specifies the size, in bytes, of the corresponding elements in the rgpbValueData array.
-
pvArg
-
Arguments that are passed through to the callback function.
QuickInfo
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.