[packages/transmission] fix crash with openssl 3; rel 4

atler atler at pld-linux.org
Sat Oct 16 18:44:17 CEST 2021


commit d52eb4cbe1499115bdea4a3f3b1542ac6413c952
Author: Jan Palus <atler at pld-linux.org>
Date:   Sat Oct 16 18:41:40 2021 +0200

    fix crash with openssl 3; rel 4
    
    issue is the same as in freerdp2 -- rc4 is no longer available by
    default which needs explicit load of "legacy" provider -- hence fix was
    borrowed from freerdp2. to be dropped with next transmision version --
    upstream went for standalone rc4 implementation instead.

 openssl3.patch    | 23 +++++++++++++++++++++++
 transmission.spec |  4 +++-
 2 files changed, 26 insertions(+), 1 deletion(-)
---
diff --git a/transmission.spec b/transmission.spec
index ff658bd..76bc486 100644
--- a/transmission.spec
+++ b/transmission.spec
@@ -12,7 +12,7 @@ Summary(hu.UTF-8):	Egy sokoldalú és multiplatformos BitTorrent kliens
 Summary(pl.UTF-8):	Wszechstronny i wieloplatformowy klient BitTorrenta
 Name:		transmission
 Version:	3.00
-Release:	3
+Release:	4
 License:	MIT
 Group:		Applications/Communications
 Source0:	https://github.com/transmission/transmission-releases/raw/master/%{name}-%{version}.tar.xz
@@ -20,6 +20,7 @@ Source0:	https://github.com/transmission/transmission-releases/raw/master/%{name
 Source1:	%{name}.sysconfig
 Source2:	%{name}.init
 Patch0:		%{name}-ckb_po.patch
+Patch1:		openssl3.patch
 Patch2:		%{name}-version.patch
 URL:		http://transmissionbt.com/
 BuildRequires:	autoconf
@@ -241,6 +242,7 @@ Narzędzia dla klienta BitTorrenta Transmission.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 %if %{with verchange}
 %patch2 -p1
 ./update-version-h.sh
diff --git a/openssl3.patch b/openssl3.patch
new file mode 100644
index 0000000..9aa763a
--- /dev/null
+++ b/openssl3.patch
@@ -0,0 +1,23 @@
+--- transmission-3.00/libtransmission/crypto-utils-openssl.c.orig	2020-05-22 13:04:23.386804824 +0200
++++ transmission-3.00/libtransmission/crypto-utils-openssl.c	2021-10-16 18:32:47.294590906 +0200
+@@ -17,6 +17,9 @@
+ #include <openssl/err.h>
+ #include <openssl/evp.h>
+ #include <openssl/opensslv.h>
++#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3)
++#include <openssl/provider.h>
++#endif
+ #include <openssl/rand.h>
+ #include <openssl/ssl.h>
+ #include <openssl/x509.h>
+@@ -184,6 +187,10 @@
+ 
+ tr_rc4_ctx_t tr_rc4_new(void)
+ {
++#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3)
++    if (OSSL_PROVIDER_load(NULL, "legacy") == NULL)
++        return NULL;
++#endif
+     EVP_CIPHER_CTX* handle = EVP_CIPHER_CTX_new();
+ 
+     if (check_result(EVP_CipherInit_ex(handle, EVP_rc4(), NULL, NULL, NULL, -1)))
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/transmission.git/commitdiff/d52eb4cbe1499115bdea4a3f3b1542ac6413c952



More information about the pld-cvs-commit mailing list