Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Iskanje po podpori

Izogibajte se prevarantski tehnični podpori. Nikoli vam ne bomo naročili, da pokličete telefonsko številko ali nam pošljete osebne podatke. Sumljivo dejavnost prijavite z gumbom »Prijavi zlorabo«.

Learn More

Is there way to check via javascript if my self-signed certificate is installed in my browser

  • 1 odgovor
  • 3 imajo to težavo
  • 4 ogledi
  • Zadnji odgovor od dveditz

more options

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?

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?

Vsi odgovori (1)

more options

There's no simple JavaScript "is this installed" method, but you might be able to detect it through fingerprinting tricks.

  1. host an image on a site whose cert is issued by the root you want to detect.
  2. write a function redirectToCertPage()
  3. 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.

Spremenil dveditz