CertGetValidUsages
A version of this page is also available for
4/8/2010
This function returns an array of usages consisting of the intersection of the valid usages for all certificates in an array of certificates.
Syntax
BOOL WINAPI CertGetValidUsages(
DWORD cCerts,
PCCERT_CONTEXT* rghCerts,
int* cNumOIDs,
LPSTR* rghOIDs,
DWORD* pcbOIDs
);
Parameters
- cCerts
[in] Number of certificates in the array to be checked.
- rghCerts
[in] Array of certificates to be checked for valid usage.
- cNumOIDs
[out] Number of valid usages found as the intersection of the valid usages of all certificates in the array. If all of the certificates are valid for all usages, cNumOIDS is set to negative one (-1).
- rghOIDs
[out] Array of the OIDs of the valid usages that are shared by all of the certificates in the rghCerts array. This parameter can be NULL to set the size of this structure for memory allocation purposes.
- pcbOIDs
[in, out] Pointer to a DWORD value that specifies the size, in bytes, of the rghOIDs array and the strings pointed to. When the function returns, the DWORD value contains the number of bytes needed for the array.
Return Value
If the function succeeds, the return value is nonzero (TRUE). If the function fails, the return value is zero (FALSE). For extended error information, call GetLastError.
Requirements
Header | wincrypt.h |
Library | crypt32.lib |
Windows Embedded CE | Windows CE 3.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |