Der*_*ins 5 firefox certificate certutil
我正在尝试使用 certutil 将客户端证书添加到 firefox db:此证书的目的是与服务器进行身份验证 - 服务器要求提供凭据,此证书包含凭据。
certutil -A -n "My Certificate" -d /myfirefoxprofile/ -t "CT,," -a -i /mycertificate.pfx
Run Code Online (Sandbox Code Playgroud)
但是,这给了我错误:
certutil: could not obtain certificate from file: security library: improperly formatted DER-encoded message.
Run Code Online (Sandbox Code Playgroud)
我做错了什么吗?
这是在 ubuntu 10.10 上
看起来您需要将 PFX 转换为 PEM...使用 openssl 开关的方向: http: //support.citrix.com/article/CTX106028
明确地说,显然我很困惑:
从 pfx 转换为 pem,然后使用新文件重新运行导入命令(编辑:以及下面的修改选项)。在我看来,firefox 证书导入在 pfx 文件类型上被阻塞(编辑:并且未指定适当的导入选项)。链接的说明不适用于 Firefox 导入,而是用于证书转换。
问题编辑后的附加编辑:
-t 需要 u 选项才能用作客户端证书。-u 标志需要 C 选项...certutil 标志记录在此处:http ://www.mozilla.org/projects/security/pki/nss/tools/certutil.html
您可能还想查看此处:http://www.phocean.net/2008/11/16/how-to-stop-firefox-from-prompting-for-the-client-certificate.html
,因为浏览器可能会提示关于使用证书
certutil -A -n "我的证书" -d /myfirefoxprofile/ -t "CTu,," -u "c" -a -i /mycertificate.pem
应该这样做