Retrieves the certificate associated with this key used to verify a signature.
var oCertificate = IXMLDSigKeyEx.getVerifyingCertificate();
Set oCertificate = IXMLDSigKeyEx.getVerifyingCertificate
HRESULT getVerifyingCertificate (IUnknown** oCertificate);
IUnknownPtr oCertificate = IXMLDSigKeyEx.getVerifyingCertificate();
You must call this method after a signature is verified.
If the signature contains a certificate, this method returns the certificate of the key. If the signature contains no certificate, the resultant oCertificate
parameter is NULL.
The following example demonstrates how to validate the certificate used in the signature verification. A signed signature document containing a certificate is first verified before the certificate is validated by examining the root certificate. In any production code, a more sophisticated validation procedure should be followed.
The signed signature document is used as the input for the code examples in C/C++, JScript, and Visual Basic. The output is the same in each language.
IXMLDigitalSignature, IXMLDigitalSignatureEx
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.