<div dir="ltr"><div><div>Hi,<br><br></div>I'm writing a client-server program that uses TLS for communication.<br>I'm wondering if there's any way to 
programmatically find out which TLS protocol versions are supported by the 
OpenSSL library installed on my system.<br><br>I'm currently aware of three ways which "sort of" provide this information:<br>(1) After setting up the 
TLS communication, call: SSL_get_version(ssl);  which returns "TLSV1.2", etc.<br>(2) Try to connect to a server using TLS by specifying all possible TLS versions in the client program, and see which connections pass/fail.<br>(3) Call: SSL_get_ciphers(), print their names, and try to correlate them with the protocol they're associated with.<br><br>Unfortunately, none of the above answer my question completely.<br><br>So is it possible to ascertain which TLS protocol versions are actually supported by my server-program, without trying the above methods? My purpose is not to simply make a list for my own reference, but rather finding it out on-the-fly in the server-side program, since I may run it on different versions of OpenSSL.<br><br></div><div>Thanks in advance!<br></div><div>Pratyush<br></div><div><div><br><br><br></div></div></div>