aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2022-01-04 16:01:58 +0100
committerTobias Geerinckx-Rice <me@tobias.gr>2022-01-05 03:54:03 +0100
commit14564f5847ae3babdc72da426801032a02334d0d (patch)
tree80657cda0130db6dfaf238a353d15324db209b01 /gnu/packages/patches
parentf7e6e936624c495cf138d7fc03850a2e7f2b9467 (diff)
downloadguix-14564f5847ae3babdc72da426801032a02334d0d.tar.gz
guix-14564f5847ae3babdc72da426801032a02334d0d.zip
gnu: linuxdcpp: Reanimate.
* gnu/packages/direct-connect.scm (linuxdcpp)[source]: Add patch and snippet to fix build. * gnu/packages/patches/linuxdcpp-openssl-1.1.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/linuxdcpp-openssl-1.1.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/gnu/packages/patches/linuxdcpp-openssl-1.1.patch b/gnu/packages/patches/linuxdcpp-openssl-1.1.patch
new file mode 100644
index 0000000000..6f9912afd8
--- /dev/null
+++ b/gnu/packages/patches/linuxdcpp-openssl-1.1.patch
@@ -0,0 +1,26 @@
+--- a/dcpp/CryptoManager.cpp.orig 2011-04-17 17:57:09 UTC
++++ b/dcpp/CryptoManager.cpp
+@@ -107,12 +107,20 @@ CryptoManager::CryptoManager()
+ };
+
+ if(dh) {
+- dh->p = BN_bin2bn(dh4096_p, sizeof(dh4096_p), 0);
+- dh->g = BN_bin2bn(dh4096_g, sizeof(dh4096_g), 0);
++ BIGNUM *p, *g;
+
+- if (!dh->p || !dh->g) {
++ p = BN_bin2bn(dh4096_p, sizeof(dh4096_p), 0);
++ g = BN_bin2bn(dh4096_g, sizeof(dh4096_g), 0);
++
++ if (!p || !g) {
+ dh.reset();
+ } else {
++#if OPENSSL_VERSION_NUMBER < 0x10100005L
++ dh->p = p;
++ dh->g = g;
++#else
++ DH_set0_pqg(dh, p, NULL, g);
++#endif
+ SSL_CTX_set_options(serverContext, SSL_OP_SINGLE_DH_USE);
+ SSL_CTX_set_options(serverVerContext, SSL_OP_SINGLE_DH_USE);
+ SSL_CTX_set_tmp_dh(serverContext, (DH*)dh);