18

Adobe Reader, which I use on MS Windows, has the ability to validate the digital signature (created with an X.509 certificate) in a PDF file.

I'd like to do such verification on Linux desktops. I've tried Evince and Okular, the most recommended PDF readers, but they can't do that. On the other hand, Adobe Reader is not available for Linux (see https://get.adobe.com/reader/otherversions/). PDF readers that are built-in in current versions of Firefox and Chrome neither can verify the signatures.

I'm fine with using a gui, command line tool or a firefox/chrome extension to do this.

13

Poppler (poppler-utils) contains pdfsig, which verifies the signature against the stored known certificates.

It's not yet super advanced (no export), but a great step ahead.

UPDATE: The original bug number is 16770 and it was pushed into production on 2016-03-01; it was included first in v0.42.

  • It would be great if you can edit this answer to tell us which version (even approximately) introduced this. – a CVn Jan 4 '17 at 8:48
  • Is this imported in Okular or Eviance? – Hrvoje T Mar 21 '17 at 6:58
  • Not available in the poppler-utils included with Ubuntu 16.04 – s1d Jan 16 at 9:03
  • @s1d: it was first in Bionic Beaver, whatever that means in Ubuntuland. I guess 16.04 is old. – grin Jan 17 at 19:19
11

Libreoffice Draw is able to read PDFs and allows one to verify document's certificate and signature (File -> Digital Signatures -> Digital Signatures…).

Also, when the PDF has been loaded, there is a warning message if the certificate could not be validated, yet the signature was OK.

I've tested it using 6.0.4.2, but according to crowdfunding page related to PDF signatures in LibreOffice it probably was possible back in 2015, in versions 4.4 or 4.5.

  • Not working for me, says not able to open encrypted document even after supplying the password. v5.1 on Ubuntu 16.04 – s1d Jan 16 at 8:46
  • @s1d was that encrypted document signed as well? – bjauy Jan 18 at 15:36
  • Yes, same eAadhar document being talked about in other threads on this page. – s1d Jan 19 at 7:06
0

Try our software PDF Studio Viewer, a PDF Reader for Linux that supports rendering and validating digital signatures. I am a developer for this software.

Disclosure: I am a developer at Qoppa

  • I tried it, it is actually very simple to check whether a pdf is signed or not. I don't know why this was downvoted. – Narcolessico Dec 3 '17 at 9:53
  • I tried this. Got "Signature not validated" message at the bottom of the document. When I click on the question mark hovering that message, I get a "Signature validity is UNKNOWN" pop-up. When I further click on "Details" button, I get certificate details and a button "Trust Certificate" which I click on. I then restart the PDF Studio Viewer and re-open the file, and I still get the same "Signature not validated" message with the question mark, and still "Signature validity is UNKNOWN" when I click on the mark. However, once I click on "Details", it tells me that the certificate is trusted. :S – Jānis Elmeris Aug 10 '18 at 10:56
0

The following steps show how to download the Aadhaar Card and convert it to a nice PDF:

  1. Goto https://eaadhaar.uidai.gov.in/eaadhaar/ and fill this ugly looking form.
  2. Enter the code from the SMS to download and save the file. I assume you saved it as “aadhaar-unverified.pdf”.
  3. Install acrobat reader and javascript plugins from the deb-multimedia.org repository: apt-get install acroread acroread-plugins acroread-escript
  4. Open the file with acroread, the password is the ZIP of the city.
  5. Click on the question mark, a window with title “Signature Validation Status” opens.
  6. Click “Signature Properties” to open the window with the same title.
  7. Click “Show Certificate” to open the certificate window. Choose the “Trust” tab.
  8. Click “Add to Trusted Identities”.
  9. Click “OK” to close the certificate window.
  10. Click “Validate Signature”.
  11. Click “Close” to close the Signature Properties window.
  12. Print the page into the file “aadhaar-verified.ps”.
  13. Convert the postscript file to pdf. The following command is one line. The “sed” removes a stupid “copy protection” from the postscript file and ps2pdf then creates the PDF file. sed "/mark currentfile eexec/,/cleartomark/ d" aadhaar-verified.ps | ps2pdf - aadhaar-verified.pdf
  14. Now print the copy of your E-Aadhaar Card on paper and make backups of your PDF file.

Now you have a nice verified PDF which you can print without any problems. Wasn’t that simple, eh?

  • Can you please elaborate step no.3 ? – Yuvraj Patil Feb 5 '18 at 16:42
  • I so much don't understand what is this all about that I can't even downvote. – akostadinov Aug 23 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.