Retrieves the certificate context associated with this key used to verify a signature.
HRESULT getVerifyingCertificateContext (void** pCertContext);
void *pCertContext = oIXMLDSigEx.getVerifyingCertificateContext();
You can call this method after a signature is verified.
To use the resultant certificate context, type cast it to the PCCERT_CONTEXT type. After using the certificate context, it is your responsibility to free the context by calling CertFreeCertificateContext
function of CryptoAPI.
The following example demonstrates how to validate the certificate of the key used in the signature verification. A signed signature document containing a certificate is first verified before the certificate is validated by building its chain. If the trust chain is built without errors, the certificate is deemed valid. In any production code, more sophisticated validation criteria might be necessary.
MSXML 5.0 and later
To view reference information for Visual Basic, C/C++, or Script only, click the Language Filter button in the upper-left corner of the page.
getVerifyingCertificate Method