Monday, January 24, 2022

Okular: Signing of unsigned signature fields has landed

Up to today, Okular would kind of error out when opening a PDF file that contains a signature field that was unsigned (think like the old space in paper forms saying "sign here")


It would tell you "document is signed but can't be properly validated"




 

And that was it, you couldn't do much with the signature. When you tried to "see" it all the fields would be default like "Signed at 1 Jan 1970", etc.


With the new code we properly detect that there are unsigned signatures and we offer to sign them when interacting with it





Relevant merge requests:

https://invent.kde.org/graphics/okular/-/merge_requests/539

https://gitlab.freedesktop.org/poppler/poppler/-/merge_requests/1026

11 comments:

  1. Nice to see progress on this new project! I really think this feature could use a better name and wording, though... for example "This document has unsigned signature fields" is quite confusing. What about "This document is signed but not digitally signed so Okular can't validate the signature."

    ReplyDelete
  2. This is super cool, thanks! A killer feature would be real cryptographic signatures using Smartcards (pkcs#11). I don't know any pdf reader on Linux that supports this.

    ReplyDelete
  3. Great aacid! Do you intent to support that 'image signature', maybe using stamps as a backend? Unfortunately it is a very common way of 'signature' utilized in companies and other organizations. All the best!

    ReplyDelete
  4. @AlbertVaka I think I did not explain myself correctly :D

    The document is *not* signed, it's asking you to sign it.

    ReplyDelete
  5. @scroogie These are real cryptographic signatures. I have not any smartcard myself to try but I've been told it just works if you have your nss database properly configured.

    ReplyDelete
  6. @Filipe that is just Annotations->Add Stamp, no?

    ReplyDelete
  7. @aacid, yes! Thanks, I didn't know about that! :)
    Now removing xournalapp from my system. :D

    Thanks!

    ReplyDelete
  8. @scroogie @Albert Confirmed, smartcards are working perfect, tried it with Ubuntu 21.10 and 22.04. Just have to add your sc modul to your nss db.

    ReplyDelete
  9. Does anyone know, how to make this feature usable under Ubuntu 22.04? I have tried to sign it, but it says, that no certificates are installed, although I have one certificate installed in Firefox and also in local nssdb store. Is this some kind of bug under Ubuntu 22.04? I was really looking forward to signing documents under Linux.

    ReplyDelete
  10. I've no idea about Ubuntu, my suggestion is you use Okular from flathub if the distribution one doesn't seem to be good https://flathub.org/apps/details/org.kde.okular

    ReplyDelete