Last active
March 25, 2025 18:53
-
-
Save stonehippo/710faa4b307a223e469e84b2ae3db340 to your computer and use it in GitHub Desktop.
A couple of ways to look at web server HTTPS/TLS/SSL certificate data via the command line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Inspecting HTTPS (TLS, SSL) certificates from the command line | |
I needed to inspect an HTTPS sites current certs and wanted to do it from the command line. Here are a couple of commands that I used that worked quite well. | |
## With cURL | |
``` | |
curl -i --verbose https://[server URL] | |
``` | |
cURL will report come certificate information in its versbose output when connecting to an HTTPS URL. | |
## With OpenSSL | |
``` | |
openssl s_client -showcerts -connect [server domain name]:443 | |
``` | |
I like this method, becase OpenSSL will report a lot of details about the certificates, including the full CA chain, if available. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment