Skip to content

Obtaining the certificate from a website

Extracting SSL certificates from websites can be crucial for verifying server identities and securing communications.

This guide walks you through using OpenSSL to retrieve certificates directly from command line, helping you understand the security measures of websites you interact with.

Why Extract SSL Certificates? ​

Knowing how to extract SSL certificates allows you to:

  • Verify the authenticity of a website’s SSL/TLS certificate.
  • Check certificate details such as issuer, expiration date, and subject.

Tools Required

OpenSSL: A command-line tool for using the SSL and TLS protocols.

Step-by-Step Guide

Open your command line or terminal.

Run the OpenSSL command to fetch the certificate:
sh
echo | openssl s_client -servername example.com -connect example.com:443 2>/dev/null | openssl x509 -text -noout

Personal page