IX509EndorsementKey::GetCertificateByIndex method (certenroll.h)
Gets the endorsement certificate associated with the endorsement key from the key storage provider for the specified index. You can only call the GetCertificateByIndex method after the Open method has been successfully called.
Syntax
HRESULT GetCertificateByIndex(
[in] VARIANT_BOOL ManufacturerOnly,
[in] LONG dwIndex,
[in] EncodingType Encoding,
[out, retval] BSTR *pValue
);
Parameters
[in] ManufacturerOnly
True to get manufacturer endorsement keys only; otherwise false. The default is false.
[in] dwIndex
The index of the requested endorsement certificate.
[in] Encoding
An EncodingType enumeration value that specifies the type of Unicode-encoding applied to the endorsement certificate. The default value is XCN_CRYPT_STRING_BASE64.
[out, retval] pValue
The endorsement certificate requested.
Return value
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | certenroll.h |
DLL | Certenroll.dll |