Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to get SSL certificate details using JavaScript?

Tags:

I'd like to gather certain details of an SSL certificate on a particular web-site. I know this is straightforward using the openssl tool on Linux/MacOSX. However is the same or similar possible in JavaScript?

I understand that the browser handles socket connections and that the SSL handshake occurs prior to any party sending data. However in an XMLHTTPRequest, I'd like to know if its possible to get these details as some sort of response code etc?

like image 210
shaond Avatar asked Apr 09 '10 00:04

shaond


People also ask

How do I view SSL certificate details?

For most browsers, look to see if a site URL begins with “https,” which indicates it has an SSL certificate. Then click on the padlock icon in the address bar to view the certificate information.

How do I view SSL certificates on each browser?

First, go to any SSL-enabled website and tap on the padlock icon next to the URL. Now tap on the “Details” link. A popup will be on your screen that includes CA information along with security protocol and hashing algorithm used. Tap on Certificate Information to view more details about the certificate.

What is SSL in Javascript?

SSL certificates are a small data files that cryptographically establish an encrypted link between a web server and a browser. This link ensures that all data passed between the web server and browser remain private.


1 Answers

This information simply isn't exposed to javascript, it is so rarely used (well never since it isn't available, but it would be rarely used) that it wasn't deemed important enough to add to the javascript object model I suppose...same for any very rarely used feature left out of anything.

Of course, it could have also been left out for security reasons...I'm not creative enough to come up with one at the moment, but I'm sure there's an exploit to be had there as well.

like image 94
Nick Craver Avatar answered Oct 06 '22 01:10

Nick Craver