when I'm using certutil
it returns this error: certutil: function failed: security library: bad database.
e.g. I can't list certs or keys
How Can I fix this?
when I'm using certutil
it returns this error: certutil: function failed: security library: bad database.
e.g. I can't list certs or keys
How Can I fix this?
If it is new system, your certificate database might not be initialized. To fix this, perform:
In case database already has been initialised, but still is corrupted then it has to be rebuild:
Check if working alright
Import certificate
If you want to display certifications from a specific folder (for example, the folder which stores the
cert8.db
file for Firefox), you need to specify the folder with "-d":Otherwise,
nss-certutil
may try to read *.db files from~/.netscape
folder, or maybe$HOME/.pki/nssdb
as previous user mentioned.Also check the
-d
directory path (must point to the directory) have any space or not. With space it gives the same error or bad file format error - old database format etc. Specially in Mac the folder is in"Application Support"
which contains space. So have the path fully quoted:or add the \ escape character.
And check that the folder have the following files,
cert8.db, key3.db and secmob.db.
In my case I solved problem using this solution (Windows XP, nss 3.15.1):
Quite an old question, but mentioned solutions did not work for me, because the error was caused by incorrect shell expansion.
In my case, I had to replace
~
with$HOME
, e.g.became