diff options
author | Adam C. Stephens <2071575+adamcstephens@users.noreply.github.com> | 2024-06-16 08:04:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-16 08:04:23 -0400 |
commit | 3b97a2e9ba4dd6abb8dc624941220a40d12ebe64 (patch) | |
tree | f2281cda049646dc40c585d5e08dd9dcf5635ae6 | |
parent | 7b0841d3dca9e45bd82540ef97cb80033cb250fa (diff) | |
parent | 7c128392f96982d324b61fc1d673b8224e5c5828 (diff) |
Merge pull request #320135 from adamcstephens/transmission3/vendor-patch
transmission: vendor openssl 3 patch
-rw-r--r-- | pkgs/applications/networking/p2p/transmission/default.nix | 5 | ||||
-rw-r--r-- | pkgs/applications/networking/p2p/transmission/transmission-3.00-openssl-3.patch | 37 |
2 files changed, 38 insertions, 4 deletions
diff --git a/pkgs/applications/networking/p2p/transmission/default.nix b/pkgs/applications/networking/p2p/transmission/default.nix index 9d6b95754c612..39c160c771d8b 100644 --- a/pkgs/applications/networking/p2p/transmission/default.nix +++ b/pkgs/applications/networking/p2p/transmission/default.nix @@ -46,10 +46,7 @@ stdenv.mkDerivation (finalAttrs: { patches = [ # fix build with openssl 3.0 - (fetchurl { - url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/net-p2p/transmission/files/transmission-3.00-openssl-3.patch"; - hash = "sha256-peVrkGck8AfbC9uYNfv1CIu1alIewpca7A6kRXjVlVs="; - }) + ./transmission-3.00-openssl-3.patch ]; outputs = [ "out" "apparmor" ]; diff --git a/pkgs/applications/networking/p2p/transmission/transmission-3.00-openssl-3.patch b/pkgs/applications/networking/p2p/transmission/transmission-3.00-openssl-3.patch new file mode 100644 index 0000000000000..f288298cbf3d4 --- /dev/null +++ b/pkgs/applications/networking/p2p/transmission/transmission-3.00-openssl-3.patch @@ -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 + |