Is there way to check via javascript if my self-signed certificate is installed in my browser
At the company where I work we chose to create a self-signed certificate and try to install it on all browsers. It was possible to place it in Internet Explorer and Google Chrome but fail in Firefox. We create a page similar to this (http://br.mozdev.org/firefox/caixa) and would like to display it if the browser does not have the public key installed. Is there a way to check via javascript whether a certificate is installed in the browser?
All Replies (1)
There's no simple JavaScript "is this installed" method, but you might be able to detect it through fingerprinting tricks.
- host an image on a site whose cert is issued by the root you want to detect.
- write a function redirectToCertPage()
- on the page you wanted to check from add
<img src="https://the_site/the_image" onerror="redirectToCertPage()">
If the onerror fires the user most likely doesn't have the certificate installed. There might be less likely reasons the user can't reach the image (machine down, someone moved the image file) but it should do.
Edeziri