How to display remote SSL certificate details with CLI tools/cURL?
To display remote SSL certificate details in the console, just like you would in a browser, you can use the following solutions.
Solution 1 - Using openssl
You can use openssl
command like this. Replace the highlighted part with the
select domain name
echo | openssl s_client -showcerts -servername google.com -connect google.com:443 2>/dev/null | openssl x509 -inform pem -noout -text
Solution 2 - Using curl
Using the curl
you don't get as much information but it may be what you are
looking for.
curl --insecure -vvI https://www.google.com 2>&1 | awk 'BEGIN { cert=0 } /^\* SSL connection/ { cert=1 } /^\*/ { if (cert) print }'
Solution 3 - Using nmap
Another solution is to use nmap
(needs to be installed first)
nmap -p 443 --script ssl-cert google.com
-
How to generate a private key for the existing .crt file on Nginx?
Unfortunately, this is not possible. You cannot generate a private key out of an existing certificate. If it would be possible, you would be able to impersonate virtually any HTTPS webserver.
Questions -
Where to keep SSL certificates and private keys on Ubuntu and Debian?
To list all available CA SSL certificates run the following lines of code:
Questions -
Solved: SSL_Error_rx_record_too_long
The usual cause is that the implementation of SSL on your server is not correct. The error is usually caused by a server-side problem which the server administrator will need to investigate.
Questions -
How to generate a private key for the existing .crt file on Apache?
Unfortunately, this is not possible. You cannot generate a private key out of an existing certificate. If it would be possible, you would be able to impersonate virtually any HTTPS webserver.
Questions
We are hiring.
Software is our way of making the world a tiny bit better. We build tools for the makers of tomorrow.
Help us in making the internet more reliable.

Help us with developer education and get paid.

Reliability is the
ultimate feature
Delightful observability tools that turn your logs & monitoring into a secret weapon for shipping better software faster.
Explore Better Stack
