Namespace: VerificationOptions

UI. VerificationOptions

NOTE: Digital Signature Verification requires the WebViewer Full API

Methods


<static> addTrustedCertificates(certificates)

Loads the Public Key Certificates to be used for Digital Signature Verification. The contents of the X.509 Public Key Certificate need to encoded in a binary Distinguished Encoding Rules (DER) format, or in the plaintext Privacy-Enhanced Mail (PEM) format, which includes an appropriate header, Base64 encoded DER representing the public key certificate, and appropriate footer.
Parameters:
Name Type Description
certificates Array.<(string|File|ArrayBuffer|Int8Array|Uint8Array|Uint8ClampedArray)> An array of URLs, and/or instance of the File type, and/or a Binary Array datatype that contain the X.509 Public Key Certificates to be used for validating Digital Signatures on a document.
Example
WebViewer(...).then(async function(instance) {
  const response = await fetch(
    'https://mydomain.com/api/returns/certificate/as/arraybuffer'
  );
  const certificateAsArrayBuffer = await response.arrayBuffer();
  instance.UI.VerificationOptions.addTrustedCertificates([
     certificateAsArrayBuffer,
    'https://mydomain.com/path/to/certificate1.cer',
    'https://mydomain.com/path/to/certificate2.crt',
  ])
});

<static> loadTrustList(TrustList)

Loads a Trust List to be used for Digital Signature Verification. The Trust List is structured in Acrobat's FDF Data/Cert Exchange format into the VerificationOptions certificate store. Certificates inside the FDF trust list that cannot be decoded and loaded, will be skipped.
Parameters:
Name Type Description
TrustList Blob | ArrayBuffer | Int8Array | Uint8Array | Uint8ClampedArray A buffer representation of FDF Certificate Exchange Data
Example
WebViewer(...).then(async function(instance) {
  const response = await fetch(
    'https://mydomain.com/api/returns/trustList/'
  );
  const trustListAsArrayBuffer = await response.arrayBuffer();
  instance.UI.VerificationOptions.loadTrustList(trustListAsArrayBuffer);
});