Hi,
I am experiencing a similar problem with papers 49.8-2 on debian
testing (forky). In particular I am having problem with signature
*verification* (instead of signing).
When opening the a signed pdf, the signer certificate reported as
"issued by an untrusted source", even when the issuing CA is correctly
trusted in the user's NSS database.
Setup:
1) CA imported as trusted for signatures in ~/.pki/nssdb (certutil -t
",C,").
2) pdfsig (unconfined) reports "Certificate is Trusted";
3) Papers reports untrusted source and prints:
NSS_Init failed: security library: bad database.
NSS_Shutdown failed: NSS could not shutdown. Objects are still in
use.
I checked with strace and journalctl what happens:
1) poppler first tries the Firefox profile NSS DB; the profile denies
reading ~/.mozilla/firefox/*/cert9.db (EACCES).
2) It then falls back to ~/.pki/nssdb: open is allowed, but locking is
no.
3) In the journal I have:
apparmor="DENIED" operation="file_lock" class="file"
profile="/usr/bin/papers" name="/home/<user>/.pki/nssdb/cert9.db"
comm="pool-1" requested_mask="k" denied_mask="k" fsuid=1000 ouid=1000
AFAIK cert9.db is SQLite, which needs a shared lock even for reads, so
NSS fails and Papers has no trust anchors.
I added to /etc/apparmor.d/local/usr.bin.papers this lines to fix the
problem
owner @{HOME}/.pki/nssdb/ r,
owner @{HOME}/.pki/nssdb/* rk,
Please note that signing will need more (write access, see also
#1120163 for smart card readers), but the rule above could perhaps be
applied first, since it fixes verification for everyone without
widening write access.
--
Saluti,
Riccardo