unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 6f9912afd8f389e039e225c8f1c12e18842e604c 784 bytes (raw)
name: packages/patches/linuxdcpp-openssl-1.1.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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);

debug log:

solving 6f9912afd8f389e039e225c8f1c12e18842e604c ...
found 6f9912afd8f389e039e225c8f1c12e18842e604c in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).