]> git.pld-linux.org Git - packages/perl-Crypt-SSLeay.git/commitdiff
- rel 10; fix openssl build auto/th/perl-Crypt-SSLeay-0.72-10
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 20 Sep 2018 13:22:01 +0000 (15:22 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 20 Sep 2018 13:22:01 +0000 (15:22 +0200)
openssl.patch [new file with mode: 0644]
perl-Crypt-SSLeay.spec

diff --git a/openssl.patch b/openssl.patch
new file mode 100644 (file)
index 0000000..1e3dbad
--- /dev/null
@@ -0,0 +1,39 @@
+--- Crypt-SSLeay-0.72/SSLeay.xs~       2014-04-24 00:36:24.000000000 +0200
++++ Crypt-SSLeay-0.72/SSLeay.xs        2018-09-20 14:58:57.648701785 +0200
+@@ -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 SSLv23_client_method()
+ static void InfoCallback(const SSL *s,int where,int ret)
+     {
+@@ -145,21 +141,8 @@ SSL_CTX_new(packname, ssl_version)
+             RAND_seed(buf, CRYPT_SSLEAY_RAND_BUFSIZE);
+         }
+-        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
+-        }
++        /* v23 is the default */
++        ctx = SSL_CTX_new(SSLv23_client_method());
+         SSL_CTX_set_options(ctx,SSL_OP_ALL|0);
+         SSL_CTX_set_default_verify_paths(ctx);
index 1fc491e6b23d4427118a148aa851d68873984f48..010c62a6bd6375c8812d709412ceb64dbe2970ed 100644 (file)
@@ -23,13 +23,14 @@ Summary(zh_CN.UTF-8):       Crypt::SSLeay - 提供 LWP HTTPS 支持的 OpenSSL 胶水
 Summary(zh_TW.UTF-8):  Crypt::SSLeay - 提供 LWP HTTPS 支援的 OpenSSL glue。
 Name:          perl-Crypt-SSLeay
 Version:       0.72
-Release:       9
+Release:       10
 # same as perl
 License:       GPL v1+ or Artistic
 Group:         Development/Languages/Perl
 Source0:       http://www.cpan.org/modules/by-module/Crypt/%{pdir}-%{pnam}-%{version}.tar.gz
 # Source0-md5: 77d955c9056dbb12413d95d8852a9cdf
 Patch0:                no-dot-in-inc.patch
+Patch1:                openssl.patch
 URL:           http://search.cpan.org/dist/Crypt-SSLeay/
 BuildRequires: openssl-devel >= 0.9.7d
 BuildRequires: perl-ExtUtils-CBuilder >= 0.280205
@@ -177,6 +178,7 @@ Crypt::SSLeay 软件包包含 Net::SSL(它在 HTTPS 请求时
 %prep
 %setup -q -n %{pdir}-%{pnam}-%{version}
 %patch0 -p1
+%patch1 -p1
 
 %build
 yes "" | %{__perl} Makefile.PL \
This page took 0.429977 seconds and 4 git commands to generate.