IXpsSignature::Verify method (xpsdigitalsignature.h)
Verifies the signature against a specified X.509 certificate.
Syntax
HRESULT Verify(
[in] const CERT_CONTEXT *x509Certificate,
[out, retval] XPS_SIGNATURE_STATUS *sigStatus
);
Parameters
[in] x509Certificate
The CERT_CONTEXT structure that contains the X.509 certificate that will be used for verification.
If the signature is not incomplete or incompliant, this certificate will be used only to validate that the signed data in the XPS package is intact. The certificate will not be used to perform any other checks. Before using the certificate the application is expected to verify the trust chain and any other requirements.
[out, retval] sigStatus
The XPS_SIGNATURE_STATUS value that describes the results of the verification.
Return value
The method returns an HRESULT. Possible values include, but are not limited to, those in the table that follows. For return values that are not listed in this table, see XPS Digital Signature API Errors and XPS Document Errors.
Return code | Description |
---|---|
|
The method succeeded. |
|
x509Certificate or sigStatus is NULL. |
|
The interface is not connected to the signature manager. |
Remarks
This method detects the signature status in the order that is specified in section 10.2.1.2 of the XML Paper Specification. The sequence of detection is as follows: incompliant, incomplete, broken, questionable, and, finally, valid. This means that if, for example, a signature is found to be incompliant, no digest will be calculated if the signature is also broken.
For more information on the different types of signature statuses that can be detected by this method, see XPS_SIGNATURE_STATUS.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7 [desktop apps only] |
Minimum supported server | Windows Server 2008 R2 [desktop apps only] |
Target Platform | Windows |
Header | xpsdigitalsignature.h |