[okular] [Bug 498558] New: Can't import certificates to digitally sign in Okular, it gives "NSS_Init failed: security library: bad database"
Allexus J
bugzilla_noreply at kde.org
Sun Jan 12 14:21:53 GMT 2025
https://bugs.kde.org/show_bug.cgi?id=498558
Bug ID: 498558
Summary: Can't import certificates to digitally sign in Okular,
it gives "NSS_Init failed: security library: bad
database"
Classification: Applications
Product: okular
Version: 24.12.0
Platform: Ubuntu
OS: Linux
Status: REPORTED
Severity: major
Priority: NOR
Component: PDF backend
Assignee: okular-devel at kde.org
Reporter: a.geno at libero.it
Target Milestone: ---
I'm struggling to import self signed certificates into Okular to digitally sign
a pdf, I cannot succeed.
I tried two ways:
1)
$ rm -rf ~/.pki/nssdb/ && mkdir -p ~/.pki/nssdb
$ certutil -N -d ~/.pki/nssdb
$ certutil -S -d ~/.pki/nssdb -s "CN=Example Signing Certificate;OU=Example
Certificate Authority;O=Example Organization;L=City;ST=State;C=US" -t ",,C,C"
-n "Example Signing Certificate" -x
Then I started Okular via terminal, I made sure backend pdf setting was set on
database certificate path /home/allexj/.pki/nssdb, and it gives me
NSS_Init failed: security library: bad database.
2)
I also tried creating certificate in a different way, but the result is the
same (same error as before):
$ openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes \
-keyout signing.key -out signing.crt -subj "/CN=John T
Doe/emailAddress=you at somesite.com" \
-addext "subjectAltName=email:you at somesite.com"
$ openssl pkcs12 -export -in signing.crt -inkey signing.key -out
signing-certificate.p12 -name "John T Doe"
$ rm .rf ~/.pki/nssdb && mkdir -p ~/.pki/nssdb && certutil -d ~/.pki/nssdb
-N
$ pk12util -d ~/.pki/nssdb -i signing-certificate.p12
What am I doing wrong? Is this a bug?
SOFTWARE/OS VERSIONS
OS: Ubuntu 24.04.1, Gnome
$ kf5-config --version
Qt: 5.15.13
KDE Frameworks: 5.115.0
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Okular-devel
mailing list