Retrieving Certificates used for an HTTPS webpage

It might sometimes be useful to know how to retrieve certificates that have been used to connect to a secured webpage.here are two ways.The first one is the simplest, on the other hand the second one is harder but it always works.

Using Firefox

Connect to your webpage and click on the padlock near the webpage address. Click on More Information button and then click on View Certificate. Go to the details panel, a list of certificate should appear. You can now export these certificates.

Information

If you are using my TLS library you must export certificates in binary-DER format. This means that the extension of your certificates must be .der.

Using Wireshark

  1. Install [http://www.wireshark.org/download.html|wireshark]] and start a new session
  2. In the filter, type : tcp.port eq 443
  3. Open your favourite browser and directly type the address of the webpage and press enter
  4. In wireshark, stop the running live capture (red square button)
  5. Select the first entry that the Info column is Certificate
  6. Expand Secure Sockets Layer and until you see all your certificates as in this image : /media/uploads/feb11/wireshark-cert.png
  7. Right click on one certificate and select Export selected packet bytes.
  8. Save it

Information

Certificates retrieved using this method are saved in binary-DER format


Please log in to post comments.