Tariq Abbas
Tariq Abbas

Reputation: 171

certificate Installation in Mozilla and Chrome

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

Answers (2)

rmhrisk
rmhrisk

Reputation: 1856

You can not.

Take a look at fortofyapp.com for some middleware that enables this use case.

Upvotes: 0

cdan
cdan

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

Related Questions