Commit 1685914d authored by Steve Lhomme's avatar Steve Lhomme

contrib: gnutls: update to 3.6.14

ecc_scalar_random is public in the nettle they embed, but the symbol is not
mangled in the original nettle package, so it's not mangled here either. It
leads to the nettle symbol behind defined twice.

The bug is actually in nettle, not the script that imports nettle in gnutls.
parent 58e68e2f
c3c4178c8663e3d1207aaf771ceb43e7e75a9f11b4ea3a26fde9d04a23762b05bac8fe290b74d63b815a354b79fc3557cfc218c196e1f80eb1fbce762948a926 gnutls-3.6.7.1.tar.xz
b2d427b5542a4679117c011dffa8efb0e0bffa3ce9cebc319f8998d03f80f4168d08f9fda35df18dbeaaada59e479d325a6c1c77d5ca7f8ce221b44e42bfe604 gnutls-3.6.14.tar.xz
--- gnutls/lib/nettle/ecc/ecc-internal.h.ecc_random 2020-06-03 15:05:27.000000000 +0200
+++ gnutls/lib/nettle/ecc/ecc-internal.h 2020-06-04 16:31:00.523456500 +0200
@@ -71,6 +71,8 @@
#define ecc_mul_g_eh _gnutls_nettle_ecc_ecc_mul_g_eh
#define ecc_mul_a_eh _gnutls_nettle_ecc_ecc_mul_a_eh
#define ecc_mul_m _gnutls_nettle_ecc_ecc_mul_m
+#undef ecc_scalar_random
+#define ecc_scalar_random _gnutls_nettle_ecc_scalar_random
#define cnd_copy _gnutls_nettle_ecc_cnd_copy
#define sec_add_1 _gnutls_nettle_ecc_sec_add_1
#define sec_sub_1 _gnutls_nettle_ecc_sec_sub_1
# GnuTLS
GNUTLS_VERSION := 3.6.7.1
GNUTLS_VERSION := 3.6.14
GNUTLS_URL := https://www.gnupg.org/ftp/gcrypt/gnutls/v3.6/gnutls-$(GNUTLS_VERSION).tar.xz
ifdef BUILD_NETWORK
......@@ -17,19 +17,14 @@ $(TARBALLS)/gnutls-$(GNUTLS_VERSION).tar.xz:
.sum-gnutls: gnutls-$(GNUTLS_VERSION).tar.xz
# gnutls 3.6.7.1 unpacks into a dir named 3.6.7
gnutls: UNPACK_DIR=gnutls-3.6.7
gnutls: gnutls-$(GNUTLS_VERSION).tar.xz .sum-gnutls
$(UNPACK)
ifdef HAVE_WIN32
cd $(UNPACK_DIR) && sed -i.orig -e s/"@INET_PTON_LIB@ @LIBPTHREAD@"/"@INET_PTON_LIB@ -lcrypt32 @LIBPTHREAD@"/g lib/gnutls.pc.in
$(APPLY) $(SRC)/gnutls/gnutls-fix-mangling.patch
# disable the dllimport in static linking (pkg-config --static doesn't handle Cflags.private)
cd $(UNPACK_DIR) && sed -i.orig -e s/"_SYM_EXPORT __declspec(dllimport)"/"_SYM_EXPORT"/g lib/includes/gnutls/gnutls.h.in
endif
ifdef HAVE_ANDROID
$(APPLY) $(SRC)/gnutls/no-create-time-h.patch
endif
cd $(UNPACK_DIR) && sed -i.orig -e 's/@LIBATOMIC_LIBS@/@LIBATOMIC_LIBS@ @HOGWEED_LIBS@ @NETTLE_LIBS@/' lib/gnutls.pc.in
$(call pkg_static,"lib/gnutls.pc.in")
$(UPDATE_AUTOCONFIG)
$(MOVE)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment