Fix off-by-one errors in ssl_cipher_get_evp()
[openssl.git] / ssl / ssltest.c
index 0f8fd3902da52b8e3243d1f6ef927322eb54b22c..4f80be8ee4d8e403c7887b62cba36d92e91bd6b2 100644 (file)
@@ -543,8 +543,8 @@ int main(int argc, char *argv[])
        int comp = 0;
 #ifndef OPENSSL_NO_COMP
        COMP_METHOD *cm = NULL;
-#endif
        STACK_OF(SSL_COMP) *ssl_comp_methods = NULL;
+#endif
        int test_cipherlist = 0;
 #ifdef OPENSSL_FIPS
        int fips_mode=0;
@@ -881,7 +881,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