Tuesday, March 8, 2016

linux - How can I verify if TLS 1.2 is supported on a remote web server from the RHEL/CentOS shell?



I'm on CentOS 5.9.



I'd like to determine from the linux shell if a remote web server specifically supports TLS 1.2 (as opposed to TLS 1.0). Is there an easy way to check for that?



I'm not seeing a related option on openssl but perhaps I'm overlooking something.


Answer




You should use openssl s_client, and the option you are looking for is -tls1_2.



An example command would be:



openssl s_client -connect google.com:443 -tls1_2



If you get the certificate chain and the handshake you know the system in question supports TLS 1.2. If you see don't see the certificate chain, and something similar to "handshake error" you know it does not support TLS 1.2. You can also test for TLS 1 or TLS 1.1 with -tls1 or tls1_1 respectively.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...