39

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.

2

5 Answers 5

36

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.

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

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.

4
  • 1
    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, 2019 at 8:46
  • @s1d was that encrypted document signed as well?
    – bjauy
    Jan 18, 2019 at 15:36
  • Yes, same eAadhar document being talked about in other threads on this page.
    – s1d
    Jan 19, 2019 at 7:06
  • Using fedora, LibreOffice Draw does not show any sign of a digital signature for one sample signed PDF, and another.
    – Milind R
    Sep 22 at 15:40
8

with either:

4
  • Please do not post the same answer to multiple questions. If the same information really answers both questions, then one question (usually the newer one) should be closed as a duplicate of the other. You can indicate this by voting to close it as a duplicate or, if you don't have enough reputation for that, raise a flag to indicate that it's a duplicate. Otherwise tailor your answer to this question and don't just paste the same answer in multiple places.
    – DavidPostill
    Jan 27, 2021 at 14:44
  • i've noticed the question was a duplicate AFTER answering, so i've deleted my answer and reposted on the older one after flagging as a duplicate.
    – eadmaster
    Jan 27, 2021 at 19:35
  • Perfect. Well done.
    – DavidPostill
    Jan 27, 2021 at 19:40
  • Libreoffice 7 Draw does not seem to recognise signatures on Fedora 38 today.
    – Milind R
    Sep 22 at 15:41
3

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

2
  • 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. Dec 3, 2017 at 9:53
  • 2
    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 Aug 10, 2018 at 10:56
-2

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?

3
  • Can you please elaborate step no.3 ? Feb 5, 2018 at 16:42
  • 2
    I so much don't understand what is this all about that I can't even downvote. Aug 23, 2019 at 15:40
  • I am glad these morons specifically designed the aadhar verification process to irritate linux users.I wonder how the code on backend would be.
    – Naveen
    Nov 27, 2019 at 9:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .