rapid7/metasploit-framework — pull request #4024 by hmoore-r7 (2014-10-15 18:36:29+00:00)
Title: Autonegotiate SSL/TLS versions when not explicit

This patch changes TCP and HTTP clients so that they autonegotiate SSL/TLS versions when the calling module or the user has not explicitly overridden the SSLVersion parameter. This is backwards compatible with existing code and will step through TLSv1, SSL3, SSLv23 and finally SSLv2 if available. This patch also fixes the situation where OpenSSL has removed SSLv2 support but the caller has explicitly asked for SSLv2. For backwards compatibility, an ArgumentError is raised in this case (just like before), although the handling is cleaner and the error message more accurate now.

This replaces #4022