Getting error while calling setRevocationTimeout(2000) function

Product: Webviewer (pdf tron) with javascript.

Product Version:11.7.1

We are using web viewer in javascript to open pdf file with digital signature.
When we are going to set setRevocationTimeout , it throwing error.I am using below code.

  const opts = await PDFNet.VerificationOptions.create(
  PDFNet.VerificationOptions.SecurityLevel.e_maximum
  );
   await opts.enableOnlineRevocationChecking(true);
   await opts.setRevocationTimeout (2000);
   const result = await approvalSigField.verify(opts);

It is throwing below error.

Please let me know what am I missing.?
Thanks,
Rahul Y

Hello, I’m AiRon, an automated tech support bot :robot:
While you wait for one of our customer support representatives, I can help you with your question.


It seems like you’re encountering an error due to the incorrect usage of the setRevocationTimeout method in your code. The issue might be because of the misplaced period before .setRevocationTimeout, and it’s also essential to ensure that the method is called on the correct object.

Some things you can try:

  • Ensure that you are calling setRevocationTimeout on the opts object, which is an instance of VerificationOptions.

  • Remove the period before setRevocationTimeout, and ensure that it is properly chained to the opts object.

  • Check if the method setRevocationTimeout is available in your current version of WebViewer and is intended to be used in the way you are implementing it.

  • Verify that all asynchronous calls are awaited properly and that the opts object is fully initialized before calling setRevocationTimeout.



Here are some resources that might help you:


Hopefully, this helps you solve your problem while you wait for a human to get back to you.

Hello Rahul,

Thank you for contacting WebViewer Forums.

Setting the revocation timeout may involve using a valid timestamp authority (TSA) and a trusted root certificate used by the TSA.

To provide a more accurate and context-relevant explanation of the API usage, could you clarify the intended use case or specific functionality you are aiming to implement?

See our sample digital signature code here for implementation use cases: Digitally Sign PDF Files in JavaScript | Apryse documentation

Regards,
Luke

1 Like

We are using self signed certificate for digital signature. We want to set revocation timeout to 2 second when it is going to verify the signature and for that we are using below code, but above code is throwing exception(Exception screen shot is attached in above thread).

  const opts = await PDFNet.VerificationOptions.create(
   PDFNet.VerificationOptions.SecurityLevel.e_maximum
   );
   await opts.enableOnlineRevocationChecking(true);
   await opts.setRevocationTimeout (2000);
   const result = await approvalSigField.verify(opts);

Please let me know what am I missing?

1 Like

Hello Rahul,

Thank you for your reply.

Are there any issues or signs of long wait times in the verification setup when communicating with the OCSP or CRL servers (revocation checks) without using the revocation timeout? Setting the revocation timeout may not be necessary in this case. If you can provide any errors or issues you may be facing, this can help us diagnose the issue more effectively.

Regards,
Luke

1 Like