Reputation: 171
how can i install a server generated browser certificate in Mozilla and Chrome using java script. ia have this method
(
var certData = document.getElementById("certdata").value;
window.crypto.importUserCertificates(null, certData, false);
)
but it is outdated and it doesn't works.
Upvotes: 3
Views: 473
Reputation: 1856
You can not.
Take a look at fortofyapp.com for some middleware that enables this use case.
Upvotes: 0
Reputation: 3576
The solution mentioned in comments - using content type "application/x-x509-user-cert" - has stopped working in Chrome since 2016 (Chrome 49). This feature has been deprecated. The long-term alternative is to use the WebCrypto API, or a higher-level API based on it, like PKI.js.
Upvotes: 2