[packages/perl-Crypt-SSLeay] - rel 10; fix openssl build

arekm arekm at pld-linux.org
Thu Sep 20 15:22:13 CEST 2018


commit fab7cecddfccc41a8201eefc174f4a77f42cd243
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Sep 20 15:22:01 2018 +0200

    - rel 10; fix openssl build

 openssl.patch          | 39 +++++++++++++++++++++++++++++++++++++++
 perl-Crypt-SSLeay.spec |  4 +++-
 2 files changed, 42 insertions(+), 1 deletion(-)
---
diff --git a/perl-Crypt-SSLeay.spec b/perl-Crypt-SSLeay.spec
index 1fc491e..010c62a 100644
--- a/perl-Crypt-SSLeay.spec
+++ b/perl-Crypt-SSLeay.spec
@@ -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 \
diff --git a/openssl.patch b/openssl.patch
new file mode 100644
index 0000000..1e3dbad
--- /dev/null
+++ b/openssl.patch
@@ -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);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/perl-Crypt-SSLeay.git/commitdiff/fab7cecddfccc41a8201eefc174f4a77f42cd243



More information about the pld-cvs-commit mailing list