I made a fresh installation of Ubuntu 22.04 and successfully imported the personal certificate into Firefox. If my memory serves me well, Okular accessed Firefox's NSS database with certificates located in a shared folder (docs). Since they are both served as Ubuntu snaps, they can no longer share certificates database. Okular's backend config does not provide any way to import them except by providing a path.
Is there a way to somehow copy the certificate from ~/snap/firefox/common/.mozilla/firefox/<some-id>.default/???
to something like ~/snap/okular/common/.pki/nssdb
? Is there a better way?
So, I had the same problem (i.e. Firefox and Okular being both a "snap" and so probably unable to share files with each other), and I managed to solve it by copying some files from Thunderbird's profile folder. I copied the following files from the
~/.thunderbird/XXXXXXXX.default-release/
folder into~/cert/okular
:cert9.db
,encrypted-openpgp-passphrase.txt
,key4.db
,pkcs11.txt
. I then imported this folder in theSettings -> Configure backends -> PDF
menu in okular and after the restart I could see the certificates and digitally sign.I have not properly tested if the 4 files are all needed or just one of them, I just copied them based on the fact that their name was suggestive enough :)