Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

Commit

Permalink
upgpkg: transmission 3.00-6: fix compatibility with OpenSSL 3.0
Browse files Browse the repository at this point in the history
Apply patch from Gentoo that enables the legacy provider (FS#76411).

git-svn-id: file:///srv/repos/svn-packages/svn@460534 eb2447ed-0c53-47e4-bac8-5bc4a241df78
  • Loading branch information
foutrelis authored and svntogit committed Nov 3, 2022
1 parent 58dbb8a commit 936dc93
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 2 deletions.
10 changes: 8 additions & 2 deletions trunk/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,28 @@
pkgbase=transmission
pkgname=(transmission-cli transmission-gtk transmission-qt libtransmission)
pkgver=3.00
pkgrel=5
pkgrel=6
arch=(x86_64)
url="http://www.transmissionbt.com/"
license=(MIT)
makedepends=(gtk3 intltool curl qt5-base libevent systemd qt5-tools libappindicator-gtk3 dht libb64 libutp miniupnpc libnatpmp)
source=(https://github.com/transmission/transmission-releases/raw/master/transmission-${pkgver}.tar.xz
transmission-3.00-openssl-3.patch
transmission-cli.sysusers
transmission-cli.tmpfiles)
sha256sums=('9144652fe742f7f7dd6657716e378da60b751aaeda8bef8344b3eefc4db255f2'
'a5e56b906724f007db0bdb9835fbf5088bb56a521ec2971aec0ea44578d5955b'
'641310fb0590d40e00bea1b5b9c843953ab78edf019109f276be9c6a7bdaf5b2'
'1266032bb07e47d6bcdc7dabd74df2557cc466c33bf983a5881316a4cc098451')

prepare() {
cd $pkgbase-$pkgver

# Fix build with autoconf 2.70
# Fix compatibility with OpenSSL 3.0 (patch from Gentoo)
# https://github.com/transmission/transmission/issues/1777
patch -Np1 -i ../transmission-3.00-openssl-3.patch

# Fix build with autoconf 2.70
sed -i 's/\[IT_PROG_INTLTOOL(\[/[\nIT_PROG_INTLTOOL(\[/' configure.ac
rm -f m4/glib-gettext.m4
autoreconf -fi
Expand Down
37 changes: 37 additions & 0 deletions trunk/transmission-3.00-openssl-3.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
From 6ee128b95bacaff20746538dc97c2b8e2b9fcc29 Mon Sep 17 00:00:00 2001
From: Mike Gilbert <floppym@gentoo.org>
Date: Sun, 15 May 2022 10:54:38 -0400
Subject: [PATCH] openssl: load "legacy" provider for RC4

---
libtransmission/crypto-utils-openssl.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/libtransmission/crypto-utils-openssl.c b/libtransmission/crypto-utils-openssl.c
index 45fd71913..14d680654 100644
--- a/libtransmission/crypto-utils-openssl.c
+++ b/libtransmission/crypto-utils-openssl.c
@@ -20,6 +20,9 @@
#include <openssl/rand.h>
#include <openssl/ssl.h>
#include <openssl/x509.h>
+#if OPENSSL_VERSION_MAJOR >= 3
+#include <openssl/provider.h>
+#endif

#include "transmission.h"
#include "crypto-utils.h"
@@ -184,6 +187,10 @@ static void openssl_evp_cipher_context_free(EVP_CIPHER_CTX* handle)

tr_rc4_ctx_t tr_rc4_new(void)
{
+#if OPENSSL_VERSION_MAJOR >= 3
+ OSSL_PROVIDER_load(NULL, "default");
+ OSSL_PROVIDER_load(NULL, "legacy");
+#endif
EVP_CIPHER_CTX* handle = EVP_CIPHER_CTX_new();

if (check_result(EVP_CipherInit_ex(handle, EVP_rc4(), NULL, NULL, NULL, -1)))
--
2.35.1

0 comments on commit 936dc93

Please sign in to comment.