如何使用java脚本在Mozilla和Chrome中安装服务器生成的浏览器证书。我有这个方法
(
var certData = document.getElementById("certdata").value;
window.crypto.importUserCertificates(null, certData, false);
)
但它已经过时,但它不起作用。
答案 0 :(得分:1)
注释中提到的解决方案-使用内容类型“ application / x-x509-user-cert”-具有stopped working in Chrome since 2016(Chrome 49)。此功能为deprecated。长期的选择是使用WebCrypto API或基于PKI.js的更高级别的API。
答案 1 :(得分:0)
你不能。
在fortofyapp.com上查看一些启用此用例的中间件。