pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/unworkable unworkable: Fix build with OpenSSL 1.1



details:   https://anonhg.NetBSD.org/pkgsrc/rev/01312e5329ff
branches:  trunk
changeset: 424185:01312e5329ff
user:      nia <nia%pkgsrc.org@localhost>
date:      Fri Mar 06 13:10:02 2020 +0000

description:
unworkable: Fix build with OpenSSL 1.1

diffstat:

 net/unworkable/distinfo                |   3 ++-
 net/unworkable/patches/patch-network.c |  32 ++++++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+), 1 deletions(-)

diffs (49 lines):

diff -r aeff57a451e4 -r 01312e5329ff net/unworkable/distinfo
--- a/net/unworkable/distinfo   Fri Mar 06 13:02:00 2020 +0000
+++ b/net/unworkable/distinfo   Fri Mar 06 13:10:02 2020 +0000
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.4 2015/11/04 00:35:42 agc Exp $
+$NetBSD: distinfo,v 1.5 2020/03/06 13:10:02 nia Exp $
 
 SHA1 (unworkable-0.53.tar.gz) = 546dee5844fcbac42fe7ae51bc5344537e9b769d
 RMD160 (unworkable-0.53.tar.gz) = a361bff35856f255be85256f9d74c3dfb11fb60e
 SHA512 (unworkable-0.53.tar.gz) = e7f0ee47239c06f466434e4cfcdf4db9cce0ca9ede3d03bf5944b596c1506f9682d517963d9d69012f5512662396b19c19db854869240754f8fe4c5bb5e9b382
 Size (unworkable-0.53.tar.gz) = 72053 bytes
 SHA1 (patch-BSDMakefile) = 722124fc797d751cb4402132a1f662553ddce0ec
+SHA1 (patch-network.c) = 4f80be58fddedec2ff17c81622139f1e13f48e98
diff -r aeff57a451e4 -r 01312e5329ff net/unworkable/patches/patch-network.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/unworkable/patches/patch-network.c    Fri Mar 06 13:10:02 2020 +0000
@@ -0,0 +1,32 @@
+$NetBSD: patch-network.c,v 1.1 2020/03/06 13:10:02 nia Exp $
+
+Use DH_set0_pqg() for OpenSSL 1.1 compatibility
+
+https://github.com/niallo/Unworkable/commit/79d717826532850772fb49e0b22ce89087636a40.patch
+
+--- network.c.orig     2008-10-06 17:04:18.000000000 +0000
++++ network.c
+@@ -1282,13 +1282,21 @@ DH *
+ network_crypto_dh()
+ {
+       DH *dhp;
++      BIGNUM *p, *g;
+ 
+       if ((dhp = DH_new()) == NULL)
+               errx(1, "network_crypto_pubkey: DH_new() failure");
+-      if ((dhp->p = BN_bin2bn(mse_P, CRYPTO_INT_LEN, NULL)) == NULL)
++      if ((p = BN_bin2bn(mse_P, CRYPTO_INT_LEN, NULL)) == NULL)
+               errx(1, "network_crypto_pubkey: BN_bin2bn(P) failure");
+-      if ((dhp->g = BN_bin2bn(mse_G, CRYPTO_INT_LEN, NULL)) == NULL)
++      if ((g = BN_bin2bn(mse_G, CRYPTO_INT_LEN, NULL)) == NULL)
+               errx(1, "network_crypto_pubkey: BN_bin2bn(G) failure");
++#if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x10100000)
++      if (DH_set0_pqg(dhp, p, NULL, g) != 1)
++              errx(1, "DH_set0_pgq failed");
++#else
++      dhp->p = p;
++      dhp->g = g;
++#endif
+       if (DH_generate_key(dhp) == 0)
+               errx(1, "network_crypto_pubkey: DH_generate_key() failure");
+ 



Home | Main Index | Thread Index | Old Index