DigitalSignature class

DigitalSignature class

Represents a digital signature on a document and the result of its verification. To learn more, visit the Work with Digital Signatures documentation article.

Properties

NameDescription
certificateHolderReturns the certificate holder object that contains the certificate was used to sign the document.
commentsGets the signing purpose comment.
isValidReturns true if this digital signature is valid and the document has not been tampered with.
issuerNameReturns the subject distinguished name of the certificate isuuer.
signTimeGets the time the document was signed.
signatureTypeGets the type of the digital signature.
signatureValueGets an array of bytes representing a signature value.
subjectNameReturns the subject distinguished name of the certificate that was used to sign the document.

Examples

Shows how to validate and display information about each signature in a document.

const doc = new aw.Document(base.myDir + "Digitally signed.docx");

for (var i = 0; i < doc.digitalSignatures.count; i++) {
  const signature = doc.digitalSignatures.at(i);
  console.log(`${signature.isValid ? "Valid" : "Invalid"} signature: `);
  console.log(`\tReason:\t${signature.comments}`);
  console.log(`\tType:\t${signature.signatureType}`);
  console.log(`\tSign time:\t${signature.signTime}`);
  console.log(`\r\n`);
}

See Also