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
- Install [http://www.wireshark.org/download.html|wireshark]] and start a new session
- In the filter, type : tcp.port eq 443
- Open your favourite browser and directly type the address of the webpage and press enter
- In wireshark, stop the running live capture (red square button)
- Select the first entry that the Info column is Certificate
- Expand Secure Sockets Layer and until you see all your certificates as in this image :
- Right click on one certificate and select Export selected packet bytes.
- Save it
Information
Certificates retrieved using this method are saved in binary-DER format
Please log in to post comments.