DigitalSignatureCertificate Property

Note: This API is now obsolete.

Returns the certificate object that was used to sign the document.

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.10
[ObsoleteAttribute("This method is obsolete. Please use CertificateHolder.Certificate instead.")]
public X509Certificate2 Certificate { get; }

Property Value

Type: X509Certificate2
Shows how to validate each signature in a document and display basic information about the signature.

// Load the document which contains signature.
Document doc = new Document(MyDir + "Document.DigitalSignature.docx");

foreach (DigitalSignature signature in doc.DigitalSignatures)
    Console.WriteLine("*** Signature Found ***");
    Console.WriteLine("Is valid: " + signature.IsValid);
    Console.WriteLine("Reason for signing: " +
                      signature.Comments); // This property is available in MS Word documents only.
    Console.WriteLine("Signature type: " + signature.SignatureType);
    Console.WriteLine("Time of signing: " + signature.SignTime);
    Console.WriteLine("Subject name: " + signature.CertificateHolder.Certificate.SubjectName);
    Console.WriteLine("Issuer name: " + signature.CertificateHolder.Certificate.IssuerName.Name);
See Also