diff --git a/SSLeay.xs b/SSLeay.xs
index 1560604..c9c143a 100644
--- a/SSLeay.xs
+++ b/SSLeay.xs
@@ -46,11 +46,7 @@ extern "C" {
 #endif
 
 
-#if SSLEAY_VERSION_NUMBER >= 0x0900
-#define CRYPT_SSL_CLIENT_METHOD SSLv3_client_method()
-#else
-#define CRYPT_SSL_CLIENT_METHOD SSLv2_client_method()
-#endif
+#define CRYPT_SSL_CLIENT_METHOD TLS_client_method()
 
 static void InfoCallback(const SSL *s,int where,int ret)
     {
@@ -148,17 +144,8 @@ SSL_CTX_new(packname, ssl_version)
         if(ssl_version == 23) {
             ctx = SSL_CTX_new(SSLv23_client_method());
         }
-        else if(ssl_version == 3) {
-            ctx = SSL_CTX_new(SSLv3_client_method());
-        }
         else {
-#ifndef OPENSSL_NO_SSL2
-            /* v2 is the default */
-            ctx = SSL_CTX_new(SSLv2_client_method());
-#else
-            /* v3 is the default */
-            ctx = SSL_CTX_new(SSLv3_client_method());
-#endif
+            ctx = SSL_CTX_new(TLS_client_method());
         }
 
         SSL_CTX_set_options(ctx,SSL_OP_ALL|0);
diff --git a/t/03-version.t b/t/03-version.t
index fa6a38f..e6eb954 100644
--- a/t/03-version.t
+++ b/t/03-version.t
@@ -63,7 +63,7 @@ use Crypt::SSLeay::Version qw(
     note $version;
     like(
         $version,
-        qr/\AOpenSSL/,
+        qr/\A(Open|Libre)SSL/,
         'openssl_version return value looks valid',
     );
 }
