parent
a9426412c0
commit
2df765fc14
@ -1,11 +0,0 @@
|
||||
--- gtk/main.c~ 2020-05-22 06:04:23.000000000 -0500
|
||||
+++ gtk/main.c 2020-07-02 08:50:35.087089387 -0500
|
||||
@@ -675,7 +675,7 @@
|
||||
|
||||
/* init the application for the specified config dir */
|
||||
stat(cbdata.config_dir, &sb);
|
||||
- application_id = g_strdup_printf("com.transmissionbt.transmission_%lu_%lu", (unsigned long)sb.st_dev,
|
||||
+ application_id = g_strdup_printf("com.transmissionbt.Transmission._%lu_%lu", (unsigned long)sb.st_dev,
|
||||
(unsigned long)sb.st_ino);
|
||||
app = gtk_application_new(application_id, G_APPLICATION_HANDLES_OPEN);
|
||||
g_signal_connect(app, "open", G_CALLBACK(on_open), &cbdata);
|
@ -1,130 +0,0 @@
|
||||
Description: Compatibility with OpenSSL 3
|
||||
We rely on RC4 because of the torrent protocol we're implementing, but this
|
||||
is no longer available in the default provider.
|
||||
Author: Steve Langasek <steve.langasek@ubuntu.com>
|
||||
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1946215
|
||||
Last-Update: 2021-12-13
|
||||
Forwarded: no
|
||||
|
||||
Index: transmission-3.00/libtransmission/crypto-utils-openssl.c
|
||||
===================================================================
|
||||
--- libtransmission/crypto-utils-openssl.c
|
||||
+++ libtransmission/crypto-utils-openssl.c
|
||||
@@ -20,6 +20,9 @@
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/ssl.h>
|
||||
#include <openssl/x509.h>
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
||||
+#include <openssl/provider.h>
|
||||
+#endif
|
||||
|
||||
#include "transmission.h"
|
||||
#include "crypto-utils.h"
|
||||
@@ -182,46 +185,86 @@
|
||||
|
||||
#endif
|
||||
|
||||
+typedef struct tr_rc4_ctx {
|
||||
+ EVP_CIPHER_CTX *cipher_ctx;
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
||||
+ OSSL_LIB_CTX *lib_ctx;
|
||||
+#endif
|
||||
+} tr_rc4_ctx;
|
||||
+
|
||||
tr_rc4_ctx_t tr_rc4_new(void)
|
||||
{
|
||||
- EVP_CIPHER_CTX* handle = EVP_CIPHER_CTX_new();
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
||||
+ OSSL_PROVIDER *legacy_provider = NULL;
|
||||
+ OSSL_PROVIDER *default_provider = NULL;
|
||||
+#endif
|
||||
+ const EVP_CIPHER *cipher;
|
||||
|
||||
- if (check_result(EVP_CipherInit_ex(handle, EVP_rc4(), NULL, NULL, NULL, -1)))
|
||||
+ tr_rc4_ctx *handle = malloc(sizeof(tr_rc4_ctx));
|
||||
+
|
||||
+ handle->cipher_ctx = EVP_CIPHER_CTX_new();
|
||||
+
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
||||
+ handle->lib_ctx = OSSL_LIB_CTX_new();
|
||||
+ TR_ASSERT(handle->lib_ctx);
|
||||
+ legacy_provider = OSSL_PROVIDER_load(handle->lib_ctx, "legacy");
|
||||
+ TR_ASSERT(legacy_provider);
|
||||
+ default_provider = OSSL_PROVIDER_load(handle->lib_ctx, "default");
|
||||
+ TR_ASSERT(default_provider);
|
||||
+
|
||||
+ cipher = EVP_CIPHER_fetch(handle->lib_ctx, "RC4", NULL);
|
||||
+#else
|
||||
+ cipher = EVP_rc4();
|
||||
+#endif
|
||||
+
|
||||
+ if (check_result(EVP_CipherInit_ex(handle->cipher_ctx, cipher, NULL, NULL,
|
||||
+ NULL, -1)))
|
||||
{
|
||||
return handle;
|
||||
}
|
||||
|
||||
- EVP_CIPHER_CTX_free(handle);
|
||||
+ EVP_CIPHER_CTX_free(handle->cipher_ctx);
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
||||
+ OSSL_LIB_CTX_free(handle->lib_ctx);
|
||||
+#endif
|
||||
return NULL;
|
||||
}
|
||||
|
||||
-void tr_rc4_free(tr_rc4_ctx_t handle)
|
||||
+void tr_rc4_free(tr_rc4_ctx_t h)
|
||||
{
|
||||
- if (handle == NULL)
|
||||
+ if (h == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
- EVP_CIPHER_CTX_free(handle);
|
||||
+ tr_rc4_ctx *handle = (tr_rc4_ctx *)h;
|
||||
+
|
||||
+ EVP_CIPHER_CTX_free(handle->cipher_ctx);
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
||||
+ OSSL_LIB_CTX_free(handle->lib_ctx);
|
||||
+#endif
|
||||
+ free(handle);
|
||||
}
|
||||
|
||||
-void tr_rc4_set_key(tr_rc4_ctx_t handle, uint8_t const* key, size_t key_length)
|
||||
+void tr_rc4_set_key(tr_rc4_ctx_t h, uint8_t const* key, size_t key_length)
|
||||
{
|
||||
- TR_ASSERT(handle != NULL);
|
||||
+ TR_ASSERT(h != NULL);
|
||||
TR_ASSERT(key != NULL);
|
||||
|
||||
- if (!check_result(EVP_CIPHER_CTX_set_key_length(handle, key_length)))
|
||||
+ tr_rc4_ctx *handle = (tr_rc4_ctx *)h;
|
||||
+ if (!check_result(EVP_CIPHER_CTX_set_key_length(handle->cipher_ctx, key_length)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
- check_result(EVP_CipherInit_ex(handle, NULL, NULL, key, NULL, -1));
|
||||
+ check_result(EVP_CipherInit_ex(handle->cipher_ctx, NULL, NULL, key, NULL, -1));
|
||||
}
|
||||
|
||||
-void tr_rc4_process(tr_rc4_ctx_t handle, void const* input, void* output, size_t length)
|
||||
+void tr_rc4_process(tr_rc4_ctx_t h, void const* input, void* output, size_t length)
|
||||
{
|
||||
- TR_ASSERT(handle != NULL);
|
||||
+ TR_ASSERT(h != NULL);
|
||||
|
||||
+ tr_rc4_ctx *handle = (tr_rc4_ctx *)h;
|
||||
if (length == 0)
|
||||
{
|
||||
return;
|
||||
@@ -232,7 +275,7 @@
|
||||
|
||||
int output_length;
|
||||
|
||||
- check_result(EVP_CipherUpdate(handle, output, &output_length, input, length));
|
||||
+ check_result(EVP_CipherUpdate(handle->cipher_ctx, output, &output_length, input, length));
|
||||
}
|
||||
|
||||
/***
|
@ -1 +1 @@
|
||||
SHA512 (transmission-3.00.tar.xz) = eeaf7fe46797326190008776a7fa641b6341c806b0f1684c2e7326c1284832a320440013e42a37acda9fd0ee5dca695f215d6263c8acb39188c5d9a836104a61
|
||||
SHA512 (transmission-4.0.0.tar.xz) = 79945af73fe7226dddadba7cc039516f2f878e05a9cf6c6d799b636b8298e2b2fa25c4426789bd41ef4d2b00d75a3c1c115c1676b4d2a9f09a1526456dceb3f8
|
||||
|
@ -1,29 +0,0 @@
|
||||
--- libtransmission/fdlimit.c~ 2020-05-22 06:04:23.000000000 -0500
|
||||
+++ libtransmission/fdlimit.c 2020-07-02 08:53:15.170954677 -0500
|
||||
@@ -390,26 +390,6 @@
|
||||
fileset_construct(&i->fileset, FILE_CACHE_SIZE);
|
||||
session->fdInfo = i;
|
||||
|
||||
-#ifndef _WIN32
|
||||
-
|
||||
- /* set the open-file limit to the largest safe size wrt FD_SETSIZE */
|
||||
- struct rlimit limit;
|
||||
-
|
||||
- if (getrlimit(RLIMIT_NOFILE, &limit) == 0)
|
||||
- {
|
||||
- int const old_limit = (int)limit.rlim_cur;
|
||||
- int const new_limit = MIN(limit.rlim_max, FD_SETSIZE);
|
||||
-
|
||||
- if (new_limit != old_limit)
|
||||
- {
|
||||
- limit.rlim_cur = new_limit;
|
||||
- setrlimit(RLIMIT_NOFILE, &limit);
|
||||
- getrlimit(RLIMIT_NOFILE, &limit);
|
||||
- tr_logAddInfo("Changed open file limit from %d to %d", old_limit, (int)limit.rlim_cur);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
-#endif
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in new issue