List supported SSL/TLS versions for a specific OpenSSL build
You can not check for version support via command line. Best option would be checking OpenSSL changelog.
Openssl versions till 1.0.0h supports SSLv2, SSLv3 and TLSv1.0. From Openssl 1.0.1 onward support for TLSv1.1 and TLSv1.2 is added.
It's clumsy, but you can get this from the usage messages for s_client
or s_server
, which are #if
ed at compile time to match the supported protocol versions. Use something like
openssl s_client -help 2>&1 | awk '/-ssl[0-9]|-tls[0-9]/{print $1}'
# in older releases any unknown -option will work; in 1.1.0 must be exactly -help
Use this
openssl ciphers -v | awk '{print $2}' | sort | uniq
This worked for me:
openssl s_client -help 2>&1 > /dev/null | egrep "\-(ssl|tls)[^a-z]"
Please let me know if this is wrong.