Search code examples
sslhttpstls1.2

Command prompt to check TLS version required by a host


Is there a command to check the TLS version required by a host site? Right now, the only way I know to check is by adjusting the max TLS version of my browser and checking if I can still access the site. However, I suspect there is a more sophisticated way to do this.


Solution

  • You can check using following commands.

    For TLS 1.3:

    openssl s_client -connect www.google.com:443 -tls1_3
    

    For TLS 1.2:

    openssl s_client -connect www.google.com:443 -tls1_2
    

    For TLS 1.1:

    openssl s_client -connect www.google.com:443 -tls1_1
    

    For TLS 1:

    openssl s_client -connect www.google.com:443 -tls1
    

    If you get the certificate chain and the handshake then the TLS version is supported. If you don't see the certificate chain, and something similar to "handshake error" then its not.