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> enableOnlineCRLRevocationChecking()

Enables online CRL revocation checking for verifying certificates.

<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);
});

<static> setRevocationProxyPrefix(proxy_server_url)

Sets the proxy URL server used for online revocation requests during Digital Signature Verification. Used to avoid CORS-related errors. The default value is https://proxy.pdftron.com.
Parameters:
Name Type Description
proxy_server_url string The URL (including the protocol such as 'https://') to use as a prefix for making online revocation requests through a proxy server to avoid CORS related issues. This can be suppressed by passing an empty string. If null is provided, or if this API is not called, the default value (https://proxy.pdftron.com) is used.
Example
WebViewer(...).then(async function(instance) {
  instance.UI.VerificationOptions.setRevocationProxyPrefix('https://proxy.mydomain.com');
});