[vlc-commits] [Git][videolan/vlc][master] contrib: gnutls: update to 3.8.3

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Feb 15 08:34:56 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
9ffc31dd by Steve Lhomme at 2024-02-15T06:48:13+00:00
contrib: gnutls: update to 3.8.3

There doesn't seem to be any API changes: https://www.gnutls.org/manual/html_node/Upgrading-from-previous-versions.html

Many of our patches have been upstreamed.

- - - - -


7 changed files:

- − contrib/src/gnutls/0001-Don-t-assume-that-UNICODE-is-not-defined.patch
- − contrib/src/gnutls/0001-fix-mingw64-detection.patch
- − contrib/src/gnutls/0001-windows-Avoid-Wint-conversion-errors.patch
- contrib/src/gnutls/SHA512SUMS
- − contrib/src/gnutls/gnutls-fix-aarch64-compilation-appleos.patch
- − contrib/src/gnutls/gnutls-fix-mangling.patch
- contrib/src/gnutls/rules.mak


Changes:

=====================================
contrib/src/gnutls/0001-Don-t-assume-that-UNICODE-is-not-defined.patch deleted
=====================================
@@ -1,111 +0,0 @@
-From 57f80070ccd8461a224cc84b255844539ab72a8d Mon Sep 17 00:00:00 2001
-From: Bruno Haible <bruno at clisp.org>
-Date: Sat, 30 May 2020 11:04:02 +0200
-Subject: [PATCH] Don't assume that UNICODE is not defined.
-
-Many Windows API functions are defined differently (redirecting to a
-function with suffix 'W') if the application defines the macro UNICODE
-than by default (redirecting to a function with suffix 'A').
-
-* gnutls/gl/clean-temp.c (OSVERSIONINFO, GetVersionEx): Redirect to the
-variant with suffix 'A'.
-* gnutls/gl/dirent-private.h (WIN32_FIND_DATA): Likewise.
-* gnutls/gl/gc-gnulib.c (CryptAcquireContext): Likewise.
-* gnutls/gl/getaddrinfo.c (GetModuleHandle): Likewise.
-* gnutls/gl/getlogin.c (GetUserName): Likewise.
-* gnutls/gl/getlogin_r.c (GetUserName): Likewise.
-* gnutls/gl/gettimeofday.c (LoadLibrary): Likewise.
-* gnutls/gl/isatty.c (LoadLibrary, QueryFullProcessImageName): Likewise.
-* gnutls/gl/link.c (GetModuleHandle, CreateHardLink): Likewise.
-* gnutls/gl/localename.c (GetLocaleInfo, EnumSystemLocales): Likewise.
-* gnutls/gl/mountlist.c (GetDriveType): Likewise.
-* gnutls/gl/nonblocking.c (GetNamedPipeHandleState): Likewise.
-* gnutls/gl/opendir.c (WIN32_FIND_DATA, GetFullPathName, FindFirstFile):
-Likewise.
-* gnutls/gl/physmem.c (GetModuleHandle): Likewise.
-* gnutls/gl/poll.c (GetModuleHandle, PeekConsoleInput, CreateEvent,
-PeekMessage, DispatchMessage): Likewise.
-* gnutls/gl/progreloc.c (GetModuleFileName): Likewise.
-* gnutls/gl/putenv.c (SetEnvironmentVariable): Likewise.
-* gnutls/gl/read.c (GetNamedPipeHandleState): Likewise.
-* gnutls/gl/readdir.c (FindNextFile): Likewise.
-* gnutls/gl/relocatable.c (GetModuleFileName): Likewise.
-* gnutls/gl/rename.c (MoveFileEx): Likewise.
-* gnutls/gl/rewinddir.c (FindFirstFile): Likewise.
-* gnutls/gl/select.c (GetModuleHandle, PeekConsoleInput, CreateEvent,
-PeekMessage, DispatchMessage): Likewise.
-* gnutls/gl/sethostname.c (GetComputerNameEx, SetComputerNameEx): Likewise.
-* gnutls/gl/socket.c (WSASocket): Likewise.
-* gnutls/gl/stat-w32.c (LoadLibrary, GetFinalPathNameByHandle): Likewise.
-* gnutls/gl/stat.c (WIN32_FIND_DATA, CreateFile, FindFirstFile): Likewise.
-* gnutls/gl/stdio-read.c (GetNamedPipeHandleState): Likewise.
-* gnutls/gl/stdio-write.c (GetNamedPipeHandleState): Likewise.
-* gnutls/gl/tmpdir.c (GetTempPath): Likewise.
-* gnutls/gl/tmpfile.c (OSVERSIONINFO, GetVersionEx, GetTempPath): Likewise.
-* gnutls/gl/uname.c (OSVERSIONINFO, GetVersionEx): Likewise.
-* gnutls/gl/utime.c (CreateFile, GetFileAttributes): Likewise.
-* gnutls/gl/windows-cond.c (CreateEvent): Likewise.
-* gnutls/gl/windows-rwlock.c (CreateEvent): Likewise.
-* gnutls/gl/windows-timedmutex.c (CreateEvent): Likewise.
-* gnutls/gl/windows-timedrecmutex.c (CreateEvent): Likewise.
-* gnutls/gl/windows-timedrwlock.c (CreateEvent): Likewise.
-* gnutls/gl/write.c (GetNamedPipeHandleState): Likewise.
----
- gnutls/gl/gettimeofday.c          |  4 +++
- gnutls/gl/stat-w32.c              |  6 +++++
- gnutls/gl/stat.c                  |  7 ++++++
- 40 files changed, 279 insertions(+), 27 deletions(-)
-
-diff --git gnutls/gl/gettimeofday.c gnutls/gl/gettimeofday.c
-index 93914ba92..305ab984e 100644
---- gnutls/gl/gettimeofday.c
-+++ gnutls/gl/gettimeofday.c
-@@ -33,6 +33,10 @@
-
- #ifdef WINDOWS_NATIVE
-
-+/* Don't assume that UNICODE is not defined.  */
-+# undef LoadLibrary
-+# define LoadLibrary LoadLibraryA
-+
- # if !(_WIN32_WINNT >= _WIN32_WINNT_WIN8)
-
- /* Avoid warnings from gcc -Wcast-function-type.  */
-diff --git gnutls/gl/stat-w32.c gnutls/gl/stat-w32.c
-index cca12dd9c..19bdfaa37 100644
---- gnutls/gl/stat-w32.c
-+++ gnutls/gl/stat-w32.c
-@@ -40,6 +40,12 @@
- #include "pathmax.h"
- #include "verify.h"
-
-+/* Don't assume that UNICODE is not defined.  */
-+#undef LoadLibrary
-+#define LoadLibrary LoadLibraryA
-+#undef GetFinalPathNameByHandle
-+#define GetFinalPathNameByHandle GetFinalPathNameByHandleA
-+
- #if !(_WIN32_WINNT >= _WIN32_WINNT_VISTA)
-
- /* Avoid warnings from gcc -Wcast-function-type.  */
-diff --git gnutls/gl/stat.c gnutls/gl/stat.c
-index e074e6a0a..9d3965d3c 100644
---- gnutls/gl/stat.c
-+++ gnutls/gl/stat.c
-@@ -65,6 +65,13 @@ orig_stat (const char *filename, struct stat *buf)
- # define WIN32_LEAN_AND_MEAN
- # include <windows.h>
- # include "stat-w32.h"
-+/* Don't assume that UNICODE is not defined.  */
-+# undef WIN32_FIND_DATA
-+# define WIN32_FIND_DATA WIN32_FIND_DATAA
-+# undef CreateFile
-+# define CreateFile CreateFileA
-+# undef FindFirstFile
-+# define FindFirstFile FindFirstFileA
- #endif
-
- #ifdef WINDOWS_NATIVE
---
-2.26.0.windows.1
-


=====================================
contrib/src/gnutls/0001-fix-mingw64-detection.patch deleted
=====================================
@@ -1,36 +0,0 @@
-From f42ec27a26433902c098cf82f7b38d93ca579869 Mon Sep 17 00:00:00 2001
-From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Thu, 23 Sep 2021 09:03:50 +0200
-Subject: [PATCH] fix mingw64 detection
-
-__MINGW64__ is only defined for 64 bits builds of mingw64 [1].
-The intended test what to only use the CertEnumCRLsInStoreFunc via LoadLibrary
-for some ancient mingw32 build and never for mingw64.
-
-__MINGW64_VERSION_MAJOR is a proper define to identify mingw64 against mingw32.
-
-[1] https://sourceforge.net/p/predef/wiki/Compilers/
-
-Co-authored-by: Johannes Kauffmann <johanneskauffmann at hotmail.com>
-
-Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
----
- lib/system.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/system.h b/lib/system.h
-index 1e8ca7d07..e15c8cd33 100644
---- a/lib/system.h
-+++ b/lib/system.h
-@@ -29,7 +29,7 @@
- #include <sys/time.h>
- 
- #ifdef _WIN32
--# if defined(__MINGW32__) && !defined(__MINGW64__) && __MINGW32_MAJOR_VERSION <= 3 && __MINGW32_MINOR_VERSION <= 20
-+# if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) && __MINGW32_MAJOR_VERSION <= 3 && __MINGW32_MINOR_VERSION <= 20
- #  define NEED_CERT_ENUM_CRLS
- typedef PCCRL_CONTEXT WINAPI(*CertEnumCRLsInStoreFunc) (HCERTSTORE
- 							 hCertStore,
--- 
-2.27.0.windows.1
-


=====================================
contrib/src/gnutls/0001-windows-Avoid-Wint-conversion-errors.patch deleted
=====================================
@@ -1,60 +0,0 @@
-From 88d79b964d88730e316919d6ccd17ca0fe9b3244 Mon Sep 17 00:00:00 2001
-From: Martin Storsjo <martin at martin.st>
-Date: Mon, 15 Aug 2022 23:50:16 +0300
-Subject: [PATCH] windows: Avoid -Wint-conversion errors
-
-Clang 15 made "incompatible pointer to integer conversion" an error
-instead of a plain warning. This fixes errors like these:
-
-system/keys-win.c:257:13: error: incompatible pointer to integer conversion initializing 'HCRYPTHASH' (aka 'unsigned long') with an expression of type 'void *' [-Wint-conversion]
-        HCRYPTHASH hHash = NULL;
-                   ^       ~~~~
-
-Signed-off-by: Martin Storsjo <martin at martin.st>
----
- lib/system/keys-win.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/lib/system/keys-win.c b/lib/system/keys-win.c
-index 4463c3b2d7..a0fffe249e 100644
---- a/lib/system/keys-win.c
-+++ b/lib/system/keys-win.c
-@@ -254,7 +254,7 @@ int capi_sign(gnutls_privkey_t key, void *userdata,
- {
- 	priv_st *priv = (priv_st *) userdata;
- 	ALG_ID Algid;
--	HCRYPTHASH hHash = NULL;
-+	HCRYPTHASH hHash = 0;
- 	uint8_t digest[MAX_HASH_SIZE];
- 	unsigned int digest_size;
- 	gnutls_digest_algorithm_t algo;
-@@ -441,7 +441,7 @@ static
- int privkey_import_capi(gnutls_privkey_t pkey, const char *url, 
- 		priv_st *priv, CRYPT_KEY_PROV_INFO *kpi)
- {
--	HCRYPTPROV hCryptProv = NULL;
-+	HCRYPTPROV hCryptProv = 0;
- 	int ret, enc_too = 0;
- 	DWORD i, dwErrCode = 0;
- 
-@@ -702,7 +702,7 @@ int privkey_import_ncrypt(gnutls_privkey_t pkey, const char *url,
- 		priv_st *priv, CRYPT_KEY_PROV_INFO *kpi, NCRYPT_PROV_HANDLE *sctx)
- {
- 	SECURITY_STATUS r;
--	NCRYPT_KEY_HANDLE nc = NULL;
-+	NCRYPT_KEY_HANDLE nc = 0;
- 	int ret, enc_too = 0;
- 	WCHAR algo_str[64];
- 	DWORD algo_str_size = 0;
-@@ -786,7 +786,7 @@ int _gnutls_privkey_import_system_url(gnutls_privkey_t pkey, const char *url)
- 	const CERT_CONTEXT *cert = NULL;
- 	CRYPT_HASH_BLOB blob;
- 	CRYPT_KEY_PROV_INFO *kpi = NULL;
--	NCRYPT_PROV_HANDLE sctx = NULL;
-+	NCRYPT_PROV_HANDLE sctx = 0;
- 	DWORD kpi_size;
- 	SECURITY_STATUS r;
- 	int ret;
--- 
-2.25.1
-


=====================================
contrib/src/gnutls/SHA512SUMS
=====================================
@@ -1 +1 @@
-72c78d7fcb024393c1d15f2a1856608ae4460ba43cc5bbbb4c29b80508cae6cb822df4638029de2363437d110187e0a3cc19a7288c3b2f44b2f648399a028438  gnutls-3.6.16.tar.xz
+74eddba01ce4c2ffdca781c85db3bb52c85f1db3c09813ee2b8ceea0608f92ca3912fd9266f55deb36a8ba4d01802895ca5d5d219e7d9caec45e1a8534e45a84  gnutls-3.8.3.tar.xz


=====================================
contrib/src/gnutls/gnutls-fix-aarch64-compilation-appleos.patch deleted
=====================================
@@ -1,12 +0,0 @@
-diff -ru gnutls/lib/accelerated/aarch64/Makefile.in gnutls/lib/accelerated/aarch64/Makefile.in
---- gnutls/lib/accelerated/aarch64/Makefile.in	2021-05-24 10:05:49.000000000 +0200
-+++ gnutls/lib/accelerated/aarch64/Makefile.in	2022-03-28 15:06:23.000000000 +0200
-@@ -1634,7 +1634,7 @@
- 	-I$(srcdir)/../../ -I$(srcdir)/../ $(am__append_1)
- 
- #ensure that we have all aarch64 instruction sets enabled for the assembler
--AM_CCASFLAGS = -Wa,-march=all
-+AM_CCASFLAGS = -Wa
- EXTRA_DIST = README
- noinst_LTLIBRARIES = libaarch64.la
- libaarch64_la_SOURCES = aarch64-common.c aarch64-common.h \


=====================================
contrib/src/gnutls/gnutls-fix-mangling.patch deleted
=====================================
@@ -1,11 +0,0 @@
---- 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


=====================================
contrib/src/gnutls/rules.mak
=====================================
@@ -1,7 +1,8 @@
 # GnuTLS
 
-GNUTLS_VERSION := 3.6.16
-GNUTLS_URL := $(GNUGPG)/gnutls/v3.6/gnutls-$(GNUTLS_VERSION).tar.xz
+GNUTLS_MAJVERSION := 3.8
+GNUTLS_VERSION := $(GNUTLS_MAJVERSION).3
+GNUTLS_URL := $(GNUGPG)/gnutls/v$(GNUTLS_MAJVERSION)/gnutls-$(GNUTLS_VERSION).tar.xz
 
 # nettle/gmp can't be used with the LGPLv2 license
 ifdef GPL
@@ -30,27 +31,9 @@ $(TARBALLS)/gnutls-$(GNUTLS_VERSION).tar.xz:
 
 gnutls: gnutls-$(GNUTLS_VERSION).tar.xz .sum-gnutls
 	$(UNPACK)
-	$(APPLY) $(SRC)/gnutls/gnutls-fix-mangling.patch
-
-	# backport gnulib patch
-	$(APPLY) $(SRC)/gnutls/0001-Don-t-assume-that-UNICODE-is-not-defined.patch
-
 	# disable the dllimport in static linking (pkg-config --static doesn't handle Cflags.private)
 	sed -i.orig -e s/"_SYM_EXPORT __declspec(dllimport)"/"_SYM_EXPORT"/g $(UNPACK_DIR)/lib/includes/gnutls/gnutls.h.in
 
-	# fix i686 UWP builds as they were using CertEnumCRLsInStore via invalid LoadLibrary
-	$(APPLY) $(SRC)/gnutls/0001-fix-mingw64-detection.patch
-
-	# fix AArch64 builds for Apple OS by removing unsupported compiler flag (gnutls#1347, gnutls#1317)
-ifdef HAVE_DARWIN_OS
-	$(APPLY) $(SRC)/gnutls/gnutls-fix-aarch64-compilation-appleos.patch
-endif
-ifdef HAVE_ANDROID
-	$(APPLY) $(SRC)/gnutls/gnutls-fix-aarch64-compilation-appleos.patch
-endif
-
-	$(APPLY) $(SRC)/gnutls/0001-windows-Avoid-Wint-conversion-errors.patch
-
 	# use CreateFile2 in Win8 as CreateFileW is forbidden in UWP
 	$(APPLY) $(SRC)/gnutls/0001-Use-CreateFile2-in-UWP-builds.patch
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/9ffc31dd5fe8224a5163e969bf9aabb872181287

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/9ffc31dd5fe8224a5163e969bf9aabb872181287
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list