fix perl-Crypt-SSLeay test (#750)
This commit is contained in:
Родитель
bcb2959124
Коммит
559634161c
|
@ -0,0 +1,43 @@
|
|||
https://rt.cpan.org/Public/Bug/Display.html?id=118343
|
||||
|
||||
On Wed Oct 12 04:36:31 2016, ppisar wrote:
|
||||
Hide quoted text
|
||||
|
||||
> After upgrading OpenSSL to 1.1.0b, tests fail like this:
|
||||
>
|
||||
> # Failed test 'use Crypt::SSLeay;'
|
||||
> # at t/00-basic.t line 6.
|
||||
> # Tried to use 'Crypt::SSLeay'.
|
||||
> # Error: Can't load '/home/test/fedora/perl-Crypt-SSLeay/Crypt-
|
||||
> SSLeay-0.72/blib/arch/auto/Crypt/SSLeay/SSLeay.so' for module
|
||||
> Crypt::SSLeay: /home/test/fedora/perl-Crypt-SSLeay/Crypt-SSLeay-
|
||||
> 0.72/blib/arch/auto/Crypt/SSLeay/SSLeay.so: undefined symbol:
|
||||
> SSLv2_client_method at /usr/lib64/perl5/DynaLoader.pm line 193.
|
||||
> # at t/00-basic.t line 6.
|
||||
>
|
||||
> This is because OpenSSL 1.1.0 removed support for SSLv2
|
||||
> <https://www.openssl.org/news/cl110.txt>.
|
||||
|
||||
Attached patch stops using SSLv3_client_method() with OpenSSL 1.1.1. TheTLS_client_method method is used instead.
|
||||
Subject: Use_TLS_client_method-with-OpenSSL-1.1.1.patch
|
||||
|
||||
--- SSLeay.xs.bak 2020-04-30 14:48:03.897259294 +0000
|
||||
+++ SSLeay.xs 2020-04-30 14:51:14.193744640 +0000
|
||||
@@ -149,15 +149,15 @@
|
||||
ctx = SSL_CTX_new(SSLv23_client_method());
|
||||
}
|
||||
else if(ssl_version == 3) {
|
||||
- ctx = SSL_CTX_new(SSLv3_client_method());
|
||||
+ ctx = SSL_CTX_new(TLS_client_method());
|
||||
}
|
||||
else {
|
||||
-#ifndef OPENSSL_NO_SSL2
|
||||
+#if !defined OPENSSL_NO_SSL2 && OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
/* v2 is the default */
|
||||
ctx = SSL_CTX_new(SSLv2_client_method());
|
||||
#else
|
||||
/* v3 is the default */
|
||||
- ctx = SSL_CTX_new(SSLv3_client_method());
|
||||
+ ctx = SSL_CTX_new(TLS_client_method());
|
||||
#endif
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
Summary: Crypt::SSLeay - OpenSSL support for LWP
|
||||
Name: perl-Crypt-SSLeay
|
||||
Version: 0.72
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
URL: https://metacpan.org/release/Crypt-SSLeay
|
||||
License: Artistic 2.0
|
||||
Group: Development/Libraries
|
||||
|
@ -11,6 +11,7 @@ Vendor: Microsoft Corporation
|
|||
Distribution: Mariner
|
||||
Source0: https://cpan.metacpan.org/authors/id/N/NA/NANIS/Crypt-SSLeay-%{version}.tar.gz
|
||||
Source1: %{LICENSE_PATH}
|
||||
Patch0: Use_TLS_client_method-with-OpenSSL-1.1.1.patch
|
||||
Requires: perl >= 5.28.0
|
||||
Requires: openssl
|
||||
BuildRequires: perl >= 5.28.0
|
||||
|
@ -33,6 +34,7 @@ Work on Crypt::SSLeay has been continued only to provide https support for the L
|
|||
%prep
|
||||
%setup -q -n Crypt-SSLeay-%{version}
|
||||
cp %{SOURCE1} ./
|
||||
%patch0 -p0
|
||||
|
||||
%build
|
||||
PERL5LIB=$(pwd) env PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
|
||||
|
@ -53,6 +55,8 @@ make test
|
|||
%{_mandir}/man?/*
|
||||
|
||||
%changelog
|
||||
* Mon Mar 15 2021 Andrew Phelps <anphel@microsoft.com> 0.72-7
|
||||
- Add patch to fix test issue
|
||||
* Thu Jun 06 2020 Joe Schmitt <joschmit@microsoft.com> 0.72-6
|
||||
- Added %%license macro.
|
||||
- Update License.
|
||||
|
|
Загрузка…
Ссылка в новой задаче