Fix in ssltest is no-ssl2 configured
[openssl.git] / ssl / ssltest.c
index 542ae0eef1ee5dbc6de379cd47d4bdf6319ea2c0..db87b1a35ea1af9f76ae6f6d4cea17c293ac113b 100644 (file)
@@ -977,7 +977,13 @@ bad:
                meth=SSLv23_method();
 #else
 #ifdef OPENSSL_NO_SSL2
-       meth=SSLv3_method();
+       if (tls1)
+               meth=TLSv1_method();
+       else
+       if (ssl3)
+               meth=SSLv3_method();
+       else
+               meth=SSLv23_method();
 #else
        meth=SSLv2_method();
 #endif