certutil: function failed: security library: bad database.

unbuntu下导入证书出错

certutil: function failed: security library: bad database.

数据库损坏,重建即可。

[lynch@localhost ~]$ mv ~/.pki/nssdb~/.pki/nssdb.corrupted

[lynch@localhost ~]$ mkdir ~/.pki/nssdb

[lynch@localhost ~]$ chmod 700~/.pki/nssdb

[lynch@localhost ~]$ certutil -d sql:$HOME/.pki/nssdb -N

Enter a password which will be used to encrypt your keys.

The password should be at least 8characters long,

andshould contain at least one non-alphabetic character.

Enter new password:

Re-enter password:

#记住这个密码

certutil -d sql:$HOME/.pki/nssdb -A -t "C,,"-n wallproxy -i ~/wallproxy-win/local/cert/CA.crt 

Enter Password orPin for"NSS Certificate DB":

#输入上面设置的密码

[lynch@localhost ~]$ certutil -d sql:$HOME/.pki/nssdb -L

Certificate Nickname                                         Trust Attributes

                                                             SSL,S/MIME,JAR/XPI

wallproxy    

OK 重启浏览器就生效了。

猜你喜欢

转载自blog.csdn.net/u013091013/article/details/82998040