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
+28.6k Golang : How to get HTTP request header information?
+7.7k Golang : Sort lines of text example
+23.4k Golang : Create PDF file from HTML file
+8.2k Golang : How to control fmt or log print format?
+14.8k Golang : Get sub string example
+44.5k Golang : Encode image to base64 example
+9.5k Golang : Create matrix with Gonum Matrix package example
+7.4k PHP : How to parse ElasticSearch JSON ?
+4.2k Golang : Get FX sentiment from website example
+11.3k Golang : Covert map/slice/array to JSON or XML format
+11.2k Golang : How to check if a string starts or ends with certain characters or words?
+6.8k Golang : get the current working directory of a running program