Trang web này sẽ có chức năng hạn chế trong khi chúng tôi trải qua bảo trì để cải thiện trải nghiệm của bạn. Nếu một bài viết không giải quyết được vấn đề của bạn và bạn muốn đặt câu hỏi, chúng tôi có cộng đồng hỗ trợ của chúng tôi đang chờ để giúp bạn tại @FirefoxSupport trên Twitter và /r/firefox trên Reddit.

Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Tìm hiểu thêm

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

  • 1 trả lời
  • 3 gặp vấn đề này
  • 4 lượt xem
  • Trả lời mới nhất được viết bởi 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?

Tất cả các câu trả lời (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.

Được chỉnh sửa bởi dveditz vào