SSL : How to check if current certificate is sha1 or sha2 from command line
Problem :
You want to check if a website SSL certificate is sha1 or sha2 algorithm from command line.
Solution :
Assuming your are running a *nix based OS like OSX or Linux with OpenSSL installed.
This is the openssl command to check your website certificate from the command line :
> openssl s_client -connect www.yoursite.com:443 < /dev/null 2>/dev/null | openssl x509 -text -in /dev/stdin | grep "Signature Algorithm"
the result should look like
Signature Algorithm: sha1WithRSAEncryption for sha1
and
Signature Algorithm: sha256WithRSAEncryption for sha2
See also : SSL : How to check if current certificate is sha1 or sha2
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+15.4k Golang : Validate hostname
+18.9k Golang : Check whether a network interface is up on your machine
+9.1k Golang : Apply Histogram Equalization to color images
+10.1k Golang : Random Rune generator
+8.6k Golang : How to join strings?
+13.2k Golang : Linear algebra and matrix calculation example
+27.3k Golang : dial tcp: too many colons in address
+19.8k Golang : How to get time from unix nano example
+15.1k Golang : How to get Unix file descriptor for console and file
+6k Golang : Extract XML attribute data with attr field tag example
+19.9k Golang : How to get own program name during runtime ?
+7k Golang : A simple forex opportunities scanner