Bug 444319 - Sign a file with a document in a card reader
Summary: Sign a file with a document in a card reader
Status: REPORTED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 21.08.2
Platform: Compiled Sources Linux
: NOR minor
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-24 12:19 UTC by Enrique Artal
Modified: 2021-11-18 08:26 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enrique Artal 2021-10-24 12:19:47 UTC
SUMMARY
Last versions of okular allow to sign documents. It works for me for certificates included in firefox key deposit.

STEPS TO REPRODUCE
1. Introduce an ID in the card reader
2. Open a pdf document in okular and click to sign it
3. Okular asks to unlock the ID. Introduce (twice) the password.

OBSERVED RESULT

Okular only shows the certificates in firefox.


EXPECTED RESULT

ID card certificates should appear


SOFTWARE/OS VERSIONS
Linux: Fedora 34 fully updated
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.85.0
Qt Version: 5.12.2

ADDITIONAL INFORMATION
I am using spanish DNIe as ID. It works in firefox, something similar happens when using chrome or autofirma.
Comment 1 Albert Astals Cid 2021-10-24 20:01:35 UTC
> something similar happens when using chrome or autofirma.

You mean it works or it does not work?
Comment 2 Enrique Artal 2021-10-24 21:18:55 UTC
Sorry for not being clear. I try to make the point:
-For Firefox the DNIe works for identification in some cases (some pages yes some pages not).
-For autofirma, either directly or via firefox or Chrome: it asks for the password but it says that the keyring is locked
-For Chrome, it does not work.

Thanks for all, because anyway it is quite practical to sign using okular with other certificates. 
Best, Enrique.
Comment 3 Albert Astals Cid 2021-10-24 21:24:29 UTC
-For autofirma, either directly or via firefox or Chrome: it asks for the password but it says that the keyring is locked

If the app that the Spanish government has done doesn't work with their own ID cards, I don't see how you expect Okular to work :D
Comment 4 Enrique Artal 2021-10-25 06:02:34 UTC
You are right, it is a mess, but it seems that both autofirma and okular have the same problem (though okular does not send an error message) that some keyring is locked, I do not know if it helps.
Comment 5 Laura David Hurka 2021-10-25 19:10:05 UTC
Might it be related to the thing outlined in the Okular manual as follows?
I think this is not exactly expected behavior, so you might have been fooled by it. :)

---

We use the Poppler library to handle signing of PDF documents and Poppler is using the NSS library to handle certificates.
At the point of writing, Poppler will try to use one of the following NSS certificate stores in order (the first that exists):

 * The current Firefox user certificate store.
 * The system-wide /etc/pki/nssdb certificate store.
 * The current user $HOME/.pki/nssdb

If you want to use a custom certificate store you can do so by setting it in the PDF Backend Configuration section of the Configure Backends... dialog.
Comment 6 Enrique Artal 2021-11-18 08:26:18 UTC
It is possible to fix where to find the certificates but I did not find how to custom the text in the formula, including size of fonts which are extremely big in my case.