9
0

Accepting request 541322 from home:vitezslav_cizek:branches:devel:languages:perl

- Disable SSLv2/3 to fix build with OpenSSL 1.1 (bsc#1067188)
  * add Crypt-SSLeay-use_TLS_instead_of_SSL.patch

OBS-URL: https://build.opensuse.org/request/show/541322
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Crypt-SSLeay?expand=0&rev=24
This commit is contained in:
2017-11-13 16:39:01 +00:00
committed by Git OBS Bridge
parent 7e8a8296cc
commit 681324a479
3 changed files with 52 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
Index: Crypt-SSLeay-0.72/SSLeay.xs
===================================================================
--- Crypt-SSLeay-0.72.orig/SSLeay.xs 2014-04-24 00:36:24.000000000 +0200
+++ Crypt-SSLeay-0.72/SSLeay.xs 2017-11-13 14:41:30.924182704 +0100
@@ -45,12 +45,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,23 +140,9 @@ 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
- }
+ ctx = SSL_CTX_new(CRYPT_SSL_CLIENT_METHOD);
- SSL_CTX_set_options(ctx,SSL_OP_ALL|0);
+ SSL_CTX_set_options(ctx,SSL_OP_ALL | SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
SSL_CTX_set_default_verify_paths(ctx);
SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, NULL);
RETVAL = ctx;

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Nov 13 13:47:00 UTC 2017 - vcizek@suse.com
- Disable SSLv2/3 to fix build with OpenSSL 1.1 (bsc#1067188)
* add Crypt-SSLeay-use_TLS_instead_of_SSL.patch
-------------------------------------------------------------------
Sat Sep 23 15:17:55 UTC 2017 - coolo@suse.com

View File

@@ -27,6 +27,7 @@ Url: http://search.cpan.org/dist/Crypt-SSLeay/
Source0: https://cpan.metacpan.org/authors/id/N/NA/NANIS/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
Patch0: no-dot-inc.patch
Patch1: Crypt-SSLeay-use_TLS_instead_of_SSL.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
@@ -55,6 +56,7 @@ necessary SSL glue.
%setup -q -n %{cpan_name}-%{version}
find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
%patch0 -p1
%patch1 -p1
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"