How do I check if my SSL Certificate is using SHA1 or SHA2, from the commandline?
And yes, i this is similar to this, but i need a cli-tool and i want to understand how it is done.
Google Chrome: After opening a website, click on the green lock icon next to the website URL in the address bar of the web browser. Click “Connection” > Certificate information. In the “Certificate” dialog, click “Details” and select “Signature hash algorithm” and lookout for the value.
For most browsers, look to see if a site URL begins with “https,” which indicates it has an SSL certificate. Then click on the padlock icon in the address bar to view the certificate information.
Enter the URL you wish to check in the browser. Right-click the page or select the Page drop-down menu, and select Properties. In the new window, look for the Connection section. This will describe the version of TLS or SSL used.
click on the padlock >> Connection >> Certificate information >> Details >> Signature Algorithm.
after googling for quite some time i came up with the following snippet (unix):
openssl s_client -connect <host>:<port> < /dev/null 2>/dev/null | openssl x509 -text -in /dev/stdin | grep "Signature Algorithm"
windows (thanx Nick Westgate, see below)
certutil -dump cacert.pem | find "Algorithm"
I know the topic is old but I think
openssl x509 -in yourcert.crt -text -noout | grep "Signature Algorithm"
would be an easier solution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With