aboutsummaryrefslogtreecommitdiffstats
path: root/main/perl-crypt-ssleay/libressl.patch
blob: 663fd9bc9922beb2e6e5d35324a59d7c2e85bfe6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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',
     );
 }