Commit fe64caa2 authored by Steve Lhomme's avatar Steve Lhomme

update patchset

use the latest gnutls
parent ca8b0094
From b9a2c70def25e5f7415f0a5e49632051709380da Mon Sep 17 00:00:00 2001
From e8501f778358d4dcab65193fe18d673c47f2291d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Tue, 10 Feb 2015 11:58:54 +0100
Subject: [PATCH 01/13] wasapi: Don't fail if the client is already initialized
......
From 74eb217d3afc3ec32e4dcba5e79b4b0b76c24a22 Mon Sep 17 00:00:00 2001
From 66ec850fcead8e65b74756d9033d2c277803ca66 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Wed, 11 May 2016 17:37:47 +0200
Subject: [PATCH 02/13] gnutls: Set cannot_unload_broken_library for winrt
......
From b7cfba23233449648ffa8fa4cb4d32dd32ed8979 Mon Sep 17 00:00:00 2001
From 8d31239f7fbfaf4e6fec147d5e054ec02f18a27c Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Kempf <jb@videolan.org>
Date: Wed, 16 Apr 2014 16:09:53 +0200
Subject: [PATCH 03/13] Cheat for Windows Store subtitles
......
From 47d558cf8432f3551f6bcf6203fb07d9c7bd214b Mon Sep 17 00:00:00 2001
From c1465131bc12195c4dac69446362a19ef3d15d73 Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Kempf <jb@videolan.org>
Date: Wed, 12 Mar 2014 00:11:26 +0100
Subject: [PATCH 04/13] Accept the weird WinRT pathes
......
From e91fcc14ce722fa3bcbb4f846f4c197961dcb15a Mon Sep 17 00:00:00 2001
From 6f25a619914351383ecaae1429287f09f28ac016 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Tue, 2 Aug 2016 18:54:28 +0200
Subject: [PATCH 05/13] config: cmdline: Use msg_* instead of fprintf
......
From 9c3b1927c02b98abff3bc1d03b84eeea0bb21a7d Mon Sep 17 00:00:00 2001
From a925df9f33d5dee7da76c27b79c26ee41727219b Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@videolabs.io>
Date: Fri, 30 Sep 2016 09:49:19 +0200
Subject: [PATCH 06/13] plugin cache: Windows doesn't like relative pathes in
......
From 0e9816089e04d80a5627a803e6cc9aa20b18eb63 Mon Sep 17 00:00:00 2001
From 565a35e44d67133705eb8f392c033bd3c9141e3f Mon Sep 17 00:00:00 2001
From: Steve Lhomme <slhomme@matroska.org>
Date: Fri, 2 Dec 2016 11:14:40 +0100
Subject: [PATCH 07/13] TEMPORARY: disable cuda/nvenc when building for
......@@ -9,10 +9,10 @@ Subject: [PATCH 07/13] TEMPORARY: disable cuda/nvenc when building for
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/src/ffmpeg/rules.mak b/contrib/src/ffmpeg/rules.mak
index 85e4b6e..f5309f5 100644
index fc68f81..92c400d 100644
--- a/contrib/src/ffmpeg/rules.mak
+++ b/contrib/src/ffmpeg/rules.mak
@@ -184,7 +184,7 @@ FFMPEGCONF += --enable-w32threads
@@ -187,7 +187,7 @@ FFMPEGCONF += --enable-w32threads
ifndef HAVE_WINSTORE
FFMPEGCONF += --enable-dxva2
else
......
From 8dc9a8ea8e6d3dd0b95e2be912f799f7db133711 Mon Sep 17 00:00:00 2001
From 18a5b5ed1082300fb9c3679019963280e5c1c0c3 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@videolabs.io>
Date: Wed, 25 Jan 2017 10:49:37 +0100
Subject: [PATCH 09/13] core: avcodec requires 32-bytes memory alignment in
Subject: [PATCH 08/13] core: avcodec requires 32-bytes memory alignment in
many cases
For example a IA0L texture on Windows is not 32 bytes aligned and avcodec
......
From d1ac204bbd6b6bcd66bddcd85bb7749fb74efbeb Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@videolabs.io>
Date: Mon, 30 Jan 2017 09:57:41 +0100
Subject: [PATCH 08/13] directxva: allow decoding FF_PROFILE_H264_BASELINE
without constraint
It works
---
modules/codec/avcodec/directx_va.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/codec/avcodec/directx_va.c b/modules/codec/avcodec/directx_va.c
index 3efed0f..75a56f9 100644
--- a/modules/codec/avcodec/directx_va.c
+++ b/modules/codec/avcodec/directx_va.c
@@ -51,7 +51,8 @@ struct picture_sys_t {
static const int PROF_MPEG2_SIMPLE[] = { FF_PROFILE_MPEG2_SIMPLE, 0 };
static const int PROF_MPEG2_MAIN[] = { FF_PROFILE_MPEG2_SIMPLE,
FF_PROFILE_MPEG2_MAIN, 0 };
-static const int PROF_H264_HIGH[] = { FF_PROFILE_H264_CONSTRAINED_BASELINE,
+static const int PROF_H264_HIGH[] = { FF_PROFILE_H264_BASELINE,
+ FF_PROFILE_H264_CONSTRAINED_BASELINE,
FF_PROFILE_H264_MAIN,
FF_PROFILE_H264_HIGH, 0 };
static const int PROF_HEVC_MAIN[] = { FF_PROFILE_HEVC_MAIN, 0 };
--
2.10.1.windows.1
From b953553bf2448a68639765396c3f16b28aca364a Mon Sep 17 00:00:00 2001
From 0313edf917a9b448d430587a432b0304d534151b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Wed, 22 Nov 2017 14:13:15 +0100
Subject: [PATCH 10/13] contrib: ffmpeg: Fix winstore build
Subject: [PATCH 09/13] contrib: ffmpeg: Fix winstore build
---
contrib/src/ffmpeg/disable-wincrypt.patch | 10 ++++++++++
......@@ -26,10 +26,10 @@ index 0000000..7c5a802
+
+ check_lib coreservices "CoreServices/CoreServices.h" UTGetOSTypeFromString "-framework CoreServices"
diff --git a/contrib/src/ffmpeg/rules.mak b/contrib/src/ffmpeg/rules.mak
index f5309f5..e95569d 100644
index 92c400d..4535551 100644
--- a/contrib/src/ffmpeg/rules.mak
+++ b/contrib/src/ffmpeg/rules.mak
@@ -238,6 +238,9 @@ endif
@@ -241,6 +241,9 @@ endif
ifdef USE_LIBAV
$(APPLY) $(SRC)/ffmpeg/libav_gsm.patch
endif
......
From 8e635330bd96648d7858fc6072f49203c00c6125 Mon Sep 17 00:00:00 2001
From 10072d3bad430484efd3017d1150b2194189f3f1 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@videolabs.io>
Date: Tue, 19 Dec 2017 12:39:06 +0100
Subject: [PATCH 11/13] contrib:avcodec: use a more recent FFmpeg version
Subject: [PATCH 10/13] contrib:avcodec: use a more recent FFmpeg version
So that it doesn't use bogus atomics based code
---
......@@ -9,7 +9,7 @@ So that it doesn't use bogus atomics based code
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/src/ffmpeg/rules.mak b/contrib/src/ffmpeg/rules.mak
index e95569d..6ae8424 100644
index 4535551..b8b5223 100644
--- a/contrib/src/ffmpeg/rules.mak
+++ b/contrib/src/ffmpeg/rules.mak
@@ -5,7 +5,7 @@
......
From cf16961077e136d57182ae7cfd1cdf214b00c74a Mon Sep 17 00:00:00 2001
From 62affde5340f840672574bdb055ec2eadfa48463 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@ycbcr.xyz>
Date: Tue, 20 Feb 2018 11:24:43 +0100
Subject: [PATCH 13/13] contrib:mpg123: don't use forbidden APIs on Phone apps
Subject: [PATCH 11/13] contrib:mpg123: don't use forbidden APIs on Phone apps
---
contrib/src/mpg123/mpg123-winstore.patch | 11 +++++++++++
......
From d1c73307799dd515e9db62164acd225ec6a8147a Mon Sep 17 00:00:00 2001
From: Martin Finkel <martin@videolabs.io>
Date: Tue, 16 Jan 2018 11:35:03 +0100
Subject: [PATCH 12/13] Revert "contrib: gnutls: update to current stable
3.5.16 (fixes #19350)"
This reverts commit 496d5f426d7fde1bb60c90a0009d222a52fd582d.
---
contrib/src/gnutls/32b5628-upstream.patch | 42 -------------------
contrib/src/gnutls/SHA512SUMS | 2 +-
contrib/src/gnutls/gnutls-android.patch | 11 +++++
contrib/src/gnutls/gnutls-loadlibrary.patch | 28 ++++++-------
contrib/src/gnutls/gnutls-mingw64.patch | 29 ++++++++++++++
contrib/src/gnutls/gnutls-pkgconfig-static.patch | 9 ++---
contrib/src/gnutls/gnutls-win32.patch | 20 +++++-----
contrib/src/gnutls/gnutls-winrt.patch | 51 +++++++-----------------
contrib/src/gnutls/rules.mak | 9 +++--
contrib/src/gnutls/winrt-topendir.patch | 39 ++++++++++--------
10 files changed, 112 insertions(+), 128 deletions(-)
delete mode 100644 contrib/src/gnutls/32b5628-upstream.patch
create mode 100644 contrib/src/gnutls/gnutls-android.patch
create mode 100644 contrib/src/gnutls/gnutls-mingw64.patch
diff --git a/contrib/src/gnutls/32b5628-upstream.patch b/contrib/src/gnutls/32b5628-upstream.patch
deleted file mode 100644
index 70ffdce..0000000
--- a/contrib/src/gnutls/32b5628-upstream.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 32b56287cc9d07dfbbc2ee21b70a8fbe1f2d9f2f Mon Sep 17 00:00:00 2001
-From: Nikos Mavrogiannopoulos <nmav@gnutls.org>
-Date: Sat, 30 Dec 2017 19:57:08 +0100
-Subject: [PATCH] x509/verify: when verifying against a self signed certificate ignore issuer
-
-That is, ignore issuer when checking the issuer's parameters strength. That
-resolves the issue of marking self-signed certificates as with insecure
-parameters during verification.
-
-Resolves #347
-
-Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
----
- lib/x509/verify.c | 12 +++++++-----
- 1 file changed, 7 insertions(+), 5 deletions(-)
-
-diff --git a/lib/x509/verify.c b/lib/x509/verify.c
-index 26b1ab3..a59e637 100644
---- a/lib/x509/verify.c
-+++ b/lib/x509/verify.c
-@@ -431,11 +431,13 @@ unsigned _gnutls_is_broken_sig_allowed(const gnutls_sign_entry_st *se, unsigned
- _gnutls_debug_log(#level": certificate's security level is unacceptable\n"); \
- return gnutls_assert_val(0); \
- } \
-- sp = gnutls_pk_bits_to_sec_param(issuer_pkalg, issuer_bits); \
-- if (sp < level) { \
-- _gnutls_cert_log("issuer", issuer); \
-- _gnutls_debug_log(#level": certificate's issuer security level is unacceptable\n"); \
-- return gnutls_assert_val(0); \
-+ if (issuer) { \
-+ sp = gnutls_pk_bits_to_sec_param(issuer_pkalg, issuer_bits); \
-+ if (sp < level) { \
-+ _gnutls_cert_log("issuer", issuer); \
-+ _gnutls_debug_log(#level": certificate's issuer security level is unacceptable\n"); \
-+ return gnutls_assert_val(0); \
-+ } \
- } \
- break;
-
---
-libgit2 0.26.0
-
diff --git a/contrib/src/gnutls/SHA512SUMS b/contrib/src/gnutls/SHA512SUMS
index e5e3af8..7292832 100644
--- a/contrib/src/gnutls/SHA512SUMS
+++ b/contrib/src/gnutls/SHA512SUMS
@@ -1 +1 @@
-451d3167be599ed8e0333dd7c9f8501fcb47b7aa871aeb461c368381c0b7ecd7e2026ec35dbbb2aa685cb2c3a22e9296e0a0699409e3744b731c1bb7e7e69f07 gnutls-3.5.16.tar.xz
+d75f6b4dea2dc742cd7f60ee0ee540d41b69991aaa937ca0138cfdf4a1e0dfaaa3863464303bfa5799e14ee02de252f71c59a7a9e57b96ff8af653e419edfd4e gnutls-3.4.14.tar.xz
diff --git a/contrib/src/gnutls/gnutls-android.patch b/contrib/src/gnutls/gnutls-android.patch
new file mode 100644
index 0000000..d816768
--- /dev/null
+++ b/contrib/src/gnutls/gnutls-android.patch
@@ -0,0 +1,11 @@
+--- gnutls.old/gl/secure_getenv.c 2016-07-13 16:36:42.095099707 +0200
++++ gnutls/gl/secure_getenv.c 2016-07-13 16:43:29.440899856 +0200
+@@ -24,7 +24,7 @@
+ # include <unistd.h>
+ # else
+ # undef issetugid
+-# ifdef _WIN32
++# if defined (_WIN32) || defined(__ANDROID__)
+ # define issetugid() 0
+ # else
+ # define issetugid() 1
diff --git a/contrib/src/gnutls/gnutls-loadlibrary.patch b/contrib/src/gnutls/gnutls-loadlibrary.patch
index 84a3230..2d9132b 100644
--- a/contrib/src/gnutls/gnutls-loadlibrary.patch
+++ b/contrib/src/gnutls/gnutls-loadlibrary.patch
@@ -1,6 +1,17 @@
---- gnutls-3.5.16/lib/system/keys-win.c 2016-11-05 19:12:02.000000000 +0100
-+++ gnutls-3.5.16/lib/system/keys-win.c.new 2017-12-26 16:29:00.221119300 +0100
-@@ -1426,7 +1426,7 @@
+--- gnutls/lib/system.c.orig 2016-07-08 14:39:45.104700999 +0200
++++ gnutls/lib/system.c 2016-07-08 14:40:28.276750643 +0200
+@@ -322,7 +322,7 @@
+ #ifdef _WIN32
+ #if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) && __MINGW32_MAJOR_VERSION <= 3 && __MINGW32_MINOR_VERSION <= 20
+ HMODULE crypto;
+- crypto = LoadLibraryA("Crypt32.dll");
++ crypto = LoadLibrary(TEXT("Crypt32.dll"));
+
+ if (crypto == NULL)
+ return GNUTLS_E_CRYPTO_INIT_FAILED;
+--- gnutls/lib/system-keys-win.c.orig 2016-07-08 14:39:58.336716261 +0200
++++ gnutls/lib/system-keys-win.c 2016-07-08 14:40:12.568732630 +0200
+@@ -1059,7 +1059,7 @@
int ret;
#ifdef DYN_NCRYPT
@@ -9,14 +20,3 @@
if (ncrypt_lib == NULL) {
return gnutls_assert_val(GNUTLS_E_CRYPTO_INIT_FAILED);
}
---- gnutls/lib/system.c.old 2017-12-28 15:24:07.479820602 +0100
-+++ gnutls/lib/system.c 2017-12-28 15:25:33.587817242 +0100
-@@ -50,7 +50,7 @@
- #if defined(_WIN32) && defined(NEED_CERT_ENUM_CRLS)
- /* used in system/certs.c */
- HMODULE crypto;
-- crypto = LoadLibraryA("Crypt32.dll");
-+ crypto = LoadLibrary(TEXT("Crypt32.dll"));
-
- if (crypto == NULL)
- return GNUTLS_E_CRYPTO_INIT_FAILED;
diff --git a/contrib/src/gnutls/gnutls-mingw64.patch b/contrib/src/gnutls/gnutls-mingw64.patch
new file mode 100644
index 0000000..9f6bd38
--- /dev/null
+++ b/contrib/src/gnutls/gnutls-mingw64.patch
@@ -0,0 +1,29 @@
+--- gnutls-3.4.13/lib/system.c.orig 2016-05-27 22:40:06.000000000 +0200
++++ gnutls-3.4.13/lib/system.c 2016-06-29 15:36:26.645190212 +0200
+@@ -34,7 +34,7 @@
+ #ifdef _WIN32
+ # include <windows.h>
+ # include <wincrypt.h>
+-# 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
+ typedef PCCRL_CONTEXT WINAPI(*CertEnumCRLsInStoreFunc) (HCERTSTORE
+ hCertStore,
+ PCCRL_CONTEXT
+@@ -300,7 +300,7 @@
+ int gnutls_system_global_init(void)
+ {
+ #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
+ HMODULE crypto;
+ crypto = LoadLibraryA("Crypt32.dll");
+
+@@ -325,7 +325,7 @@
+ void gnutls_system_global_deinit(void)
+ {
+ #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
+ FreeLibrary(Crypt32_dll);
+ #endif
+ #endif
diff --git a/contrib/src/gnutls/gnutls-pkgconfig-static.patch b/contrib/src/gnutls/gnutls-pkgconfig-static.patch
index 0a5ecfc..361d651 100644
--- a/contrib/src/gnutls/gnutls-pkgconfig-static.patch
+++ b/contrib/src/gnutls/gnutls-pkgconfig-static.patch
@@ -1,11 +1,10 @@
-diff -ru gnutls-3.5.16/lib/gnutls.pc.in gnutls-3.5.16.patched/lib/gnutls.pc.in
---- gnutls-3.5.16/lib/gnutls.pc.in 2017-03-28 20:20:50.000000000 +0300
-+++ gnutls-3.5.16.patched/lib/gnutls.pc.in 2017-12-26 16:47:54.502835713 +0200
+--- gnutls/lib/gnutls.pc.in 2015-11-03 21:47:28.000000000 +0000
++++ gnutls.patched/lib/gnutls.pc.in 2016-11-02 22:53:04.272156182 +0000
@@ -19,6 +19,6 @@
URL: http://www.gnutls.org/
Version: @VERSION@
Libs: -L${libdir} -lgnutls
--Libs.private: @LIBZ_PC@ @LIBINTL@ @LIBSOCKET@ @LIBNSL@ @LIBPTHREAD@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ @LIBUNISTRING@ @LIBIDN2_LIBS@
-+Libs.private: @LIBZ@ @LIBINTL@ @LIBSOCKET@ @LIBNSL@ @LIBPTHREAD@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ @LIBUNISTRING@ @LIBIDN2_LIBS@ @LIBIDN_LIBS@ @HOGWEED_LIBS@ @NETTLE_LIBS@
+-Libs.private: @LIBZ@ @LIBINTL@ @LIBSOCKET@ @LIBPTHREAD@ @LIBICONV@ @P11_KIT_LIBS@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@
++Libs.private: @LIBZ@ @LIBINTL@ @LIBSOCKET@ @LIBPTHREAD@ @LIBICONV@ @P11_KIT_LIBS@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ @NETTLE_LIBS@ @LIBIDN_LIBS@ @HOGWEED_LIBS@
@GNUTLS_REQUIRES_PRIVATE@
Cflags: -I${includedir}
diff --git a/contrib/src/gnutls/gnutls-win32.patch b/contrib/src/gnutls/gnutls-win32.patch
index 7c07743..197476c 100644
--- a/contrib/src/gnutls/gnutls-win32.patch
+++ b/contrib/src/gnutls/gnutls-win32.patch
@@ -1,3 +1,13 @@
+--- gnutls-3.3.22/lib/gnutls.pc.in.orig 2016-03-10 16:17:25.955785469 +0100
++++ gnutls-3.3.22/lib/gnutls.pc.in 2016-03-10 16:20:49.979795202 +0100
+@@ -19,6 +19,6 @@
+ URL: http://www.gnutls.org/
+ Version: @VERSION@
+ Libs: -L${libdir} -lgnutls
+-Libs.private: @LIBZ@ @LIBINTL@ @LIBSOCKET@ @LIBPTHREAD@ @LIBICONV@ @P11_KIT_LIBS@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ @NETTLE_LIBS@ @LIBIDN_LIBS@ @HOGWEED_LIBS@
++Libs.private: @LIBZ@ @LIBINTL@ @LIBSOCKET@ -lcrypt32 @LIBPTHREAD@ @LIBICONV@ @P11_KIT_LIBS@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ @NETTLE_LIBS@ @LIBIDN_LIBS@ @HOGWEED_LIBS@
+ @GNUTLS_REQUIRES_PRIVATE@
+ Cflags: -I${includedir}
--- gnutls.old/lib/includes/gnutls/gnutls.h.in 2016-07-01 22:44:49.319398504 +0200
+++ gnutls/lib/includes/gnutls/gnutls.h.in 2016-07-01 22:48:00.515407625 +0200
@@ -68,7 +68,7 @@
@@ -9,13 +19,3 @@
#else
# define _SYM_EXPORT
#endif
---- gnutls-3.5.16/lib/gnutls.pc.in.orig 2017-12-26 16:20:40.969104489 +0100
-+++ gnutls-3.5.16/lib/gnutls.pc.in 2017-12-26 16:22:53.817108430 +0100
-@@ -19,6 +19,6 @@
- URL: http://www.gnutls.org/
- Version: @VERSION@
- Libs: -L${libdir} -lgnutls
--Libs.private: @LIBZ@ @LIBINTL@ @LIBSOCKET@ @LIBNSL@ @LIBPTHREAD@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ @LIBUNISTRING@ @LIBIDN2_LIBS@ @LIBIDN_LIBS@ @HOGWEED_LIBS@ @NETTLE_LIBS@
-+Libs.private: @LIBZ@ @LIBINTL@ @LIBSOCKET@ @LIBNSL@ -lcrypt32 @LIBPTHREAD@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ @LIBUNISTRING@ @LIBIDN2_LIBS@ @LIBIDN_LIBS@ @HOGWEED_LIBS@ @NETTLE_LIBS@
- @GNUTLS_REQUIRES_PRIVATE@
- Cflags: -I${includedir}
diff --git a/contrib/src/gnutls/gnutls-winrt.patch b/contrib/src/gnutls/gnutls-winrt.patch
index f3057f3..02cdfc6 100644
--- a/contrib/src/gnutls/gnutls-winrt.patch
+++ b/contrib/src/gnutls/gnutls-winrt.patch
@@ -1,41 +1,20 @@
---- gnutls-3.5.16/lib/system/keys-win.c 2017-12-26 16:29:00.221119300 +0100
-+++ gnutls-3.5.16/lib/system/keys-win.c.new 2017-12-26 16:33:02.501126487 +0100
-@@ -44,6 +44,18 @@
- #include <wincrypt.h>
- #include <winbase.h>
-
-+#include <winapifamily.h>
-+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
-+# if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0A00 /* Univeral Winstore */
-+# undef CertOpenSystemStore
+--- gnutls/lib/system.c 2016-05-18 09:28:09.902830600 +0200
++++ gnutls/lib/system.c.winstore 2016-05-18 13:06:32.408396400 +0200
+@@ -34,6 +34,17 @@
+ #ifdef _WIN32
+ # include <windows.h>
+ # include <wincrypt.h>
++# include <winapifamily.h>
++# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
++# if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0A00 /* Univeral Winstore */
++# undef CertOpenSystemStore
+HCERTSTORE CertOpenSystemStore( HCRYPTPROV_LEGACY hprov, LPCSTR szSubsystemProtocol )
+{
+ return CertOpenStore( CERT_STORE_PROV_SYSTEM_A, X509_ASN_ENCODING, 0,
+ CERT_SYSTEM_STORE_CURRENT_USER, szSubsystemProtocol );
+}
-+# endif /* _WIN32_WINNT */
-+#endif /* WINAPI_FAMILY */
-+
- #define DYN_NCRYPT
-
- #ifdef __MINGW32__
---- gnutls/lib/system/keys-win.c.old 2017-12-28 11:04:45.599954683 +0100
-+++ gnutls/lib/system/keys-win.c 2017-12-28 11:07:37.999947957 +0100
-@@ -624,6 +624,9 @@
- -*/
- int _gnutls_privkey_import_system_url(gnutls_privkey_t pkey, const char *url)
- {
-+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
-+ return GNUTLS_E_UNIMPLEMENTED_FEATURE;
-+#else
- uint8_t id[MAX_WID_SIZE];
- HCERTSTORE store = NULL;
- size_t id_size;
-@@ -873,6 +876,7 @@
-
- CertCloseStore(store, 0);
- return ret;
-+#endif
- }
-
- int _gnutls_x509_crt_import_system_url(gnutls_x509_crt_t crt, const char *url)
++# endif /* _WIN32_WINNT */
++# endif /* WINAPI_FAMILY */
+ # if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) && __MINGW32_MAJOR_VERSION <= 3 && __MINGW32_MINOR_VERSION <= 20
+ typedef PCCRL_CONTEXT WINAPI(*Type_CertEnumCRLsInStore) (HCERTSTORE
+ hCertStore,
diff --git a/contrib/src/gnutls/rules.mak b/contrib/src/gnutls/rules.mak
index 9cd29be..e1fd23b 100644
--- a/contrib/src/gnutls/rules.mak
+++ b/contrib/src/gnutls/rules.mak
@@ -1,7 +1,7 @@
# GnuTLS
-GNUTLS_VERSION := 3.5.16
-GNUTLS_URL := ftp://ftp.gnutls.org/gcrypt/gnutls/v3.5/gnutls-$(GNUTLS_VERSION).tar.xz
+GNUTLS_VERSION := 3.4.14
+GNUTLS_URL := ftp://ftp.gnutls.org/gcrypt/gnutls/v3.4/gnutls-$(GNUTLS_VERSION).tar.xz
ifdef BUILD_NETWORK
ifndef HAVE_DARWIN_OS
@@ -19,10 +19,10 @@ $(TARBALLS)/gnutls-$(GNUTLS_VERSION).tar.xz:
gnutls: gnutls-$(GNUTLS_VERSION).tar.xz .sum-gnutls
$(UNPACK)
- $(APPLY) $(SRC)/gnutls/32b5628-upstream.patch
$(APPLY) $(SRC)/gnutls/gnutls-pkgconfig-static.patch
ifdef HAVE_WIN32
$(APPLY) $(SRC)/gnutls/gnutls-win32.patch
+ $(APPLY) $(SRC)/gnutls/gnutls-mingw64.patch
$(APPLY) $(SRC)/gnutls/gnutls-loadlibrary.patch
ifdef HAVE_WINSTORE
$(APPLY) $(SRC)/gnutls/gnutls-winrt.patch
@@ -31,9 +31,11 @@ endif
endif
ifdef HAVE_ANDROID
$(APPLY) $(SRC)/gnutls/no-create-time-h.patch
+ $(APPLY) $(SRC)/gnutls/gnutls-android.patch
endif
$(APPLY) $(SRC)/gnutls/read-file-limits.h.patch
ifdef HAVE_MACOSX
+ $(APPLY) $(SRC)/gnutls/gnutls-pkgconfig-osx.patch
$(APPLY) $(SRC)/gnutls/gnutls-disable-getentropy-osx.patch
$(APPLY) $(SRC)/gnutls/gnutls-disable-connectx-macos.patch
endif
@@ -57,7 +59,6 @@ GNUTLS_CONF := \
--disable-doc \
--disable-tests \
--with-included-libtasn1 \
- --with-included-unistring \
$(HOSTCONF)
GNUTLS_ENV := $(HOSTVARS)
diff --git a/contrib/src/gnutls/winrt-topendir.patch b/contrib/src/gnutls/winrt-topendir.patch
index 6051cd0..cd09c7e 100644
--- a/contrib/src/gnutls/winrt-topendir.patch
+++ b/contrib/src/gnutls/winrt-topendir.patch
@@ -1,16 +1,17 @@
---- gnutls-3.5.16/lib/x509/verify-high2.c.orig 2016-12-19 15:10:59.000000000 +0100
-+++ gnutls-3.5.16/lib/x509/verify-high2.c 2017-12-26 16:39:02.565137168 +0100
-@@ -43,6 +43,9 @@
- # endif
- #endif
+--- gnutls/lib/x509/verify-high2.c.orig 2016-05-11 21:28:25.584504325 +0200
++++ gnutls/lib/x509/verify-high2.c 2016-05-11 21:32:00.596348074 +0200
+@@ -37,6 +37,10 @@
+
+ #include <dirent.h>
+#include <windows.h>
+#include <tchar.h>
+
- /* Convenience functions for verify-high functionality
- */
-
-@@ -368,29 +371,59 @@
++
+ #ifndef _DIRENT_HAVE_D_TYPE
+ # ifdef DT_UNKNOWN
+ # define _DIRENT_HAVE_D_TYPE
+@@ -366,14 +370,40 @@
return ret;
}
@@ -53,29 +54,35 @@
int ret;
int r = 0;
char path[GNUTLS_PATH_MAX];
+@@ -381,11 +411,13 @@
+ struct dirent e;
+ #endif
- dirp = opendir(dirname);
-+ TCHAR* dirnameW = ToWide(dirname);
++ TCHAR* dirnameW = ToWide(dirname);
+ dirp = _topendir(dirnameW);
-+ free(dirnameW);
++ free(dirnameW);
if (dirp != NULL) {
do {
+ #ifdef _WIN32
- d = readdir(dirp);
+ d = _treaddir(dirp);
- if (d != NULL
- #ifdef _DIRENT_HAVE_D_TYPE
- && (d->d_type == DT_REG || d->d_type == DT_LNK || d->d_type == DT_UNKNOWN)
+ if (d != NULL) {
+ #else
+ ret = readdir_r(dirp, &e, &d);
+@@ -395,8 +427,10 @@
#endif
) {
+ #endif
+ char* d_name = FromWide(d->d_name);
snprintf(path, sizeof(path), "%s/%s",
- dirname, d->d_name);
+ dirname, d_name);
-+ free(d_name);
++ free(d_name);
if (crl != 0) {
ret =
-@@ -408,7 +441,7 @@
+@@ -414,7 +448,7 @@
}
}
while (d != NULL);
--
2.10.1.windows.1
From c76de91140fe83e6f5e44f4d5474752ac28412bb Mon Sep 17 00:00:00 2001
From: Carola Nitz <nitz.carola@googlemail.com>
Date: Fri, 29 Sep 2017 14:49:02 +0200
Subject: [PATCH 12/13] contrib: use live555 version that is compatible with
LGPL2
---
contrib/src/live555/SHA512SUMS | 2 +-
contrib/src/live555/rules.mak | 5 +----
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/contrib/src/live555/SHA512SUMS b/contrib/src/live555/SHA512SUMS
index f459fb9..02b2a69 100644
--- a/contrib/src/live555/SHA512SUMS
+++ b/contrib/src/live555/SHA512SUMS
@@ -1 +1 @@
-319639acef6474b2eec0bdfa3416ca3c88a60f57d9d22911eee018fc494978fde93a241556bc0ea309f0b6a35e0242bd44a8f4de83a845f80d9ca5f94254ade6 live.2016.11.28.tar.gz
+10846fd6d5482bbea131ae805137077997e9dec242665e3c01d699d5584154c65049e8c520ea855599e554154a148e61fea77b592d97c814a4a98c773658d8f5 live.2016.10.21.tar.gz
\ No newline at end of file
diff --git a/contrib/src/live555/rules.mak b/contrib/src/live555/rules.mak
index b77d96c..3a2526a 100644
--- a/contrib/src/live555/rules.mak
+++ b/contrib/src/live555/rules.mak
@@ -1,14 +1,12 @@
# live555
-LIVE555_VERSION := 2016.11.28
+LIVE555_VERSION := 2016.10.21
LIVE555_FILE := live.$(LIVE555_VERSION).tar.gz
LIVEDOTCOM_URL := http://live555.com/liveMedia/public/$(LIVE555_FILE)
ifdef BUILD_NETWORK
-ifdef GNUV3
PKGS += live555
endif
-endif
ifeq ($(call need_pkg,"live555"),)
PKGS_FOUND += live555
@@ -82,7 +80,6 @@ endif
SUBDIRS=groupsock liveMedia UsageEnvironment BasicUsageEnvironment
.live555: live555
- $(REQUIRE_GNUV3)
cd $< && for subdir in $(SUBDIRS); do \
echo "PREFIX = $(PREFIX)" >> $$subdir/Makefile.head && \
echo "LIBDIR = $(PREFIX)/lib" >> $$subdir/Makefile.head ; done
--
2.10.1.windows.1
From 7e273841066d77bf7a5e4e14679771e4d4873dce Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@ycbcr.xyz>
Date: Tue, 27 Mar 2018 18:57:41 +0200
Subject: [PATCH 13/13] rand: use bcrypt instead of CryptographicBufferStatics
It's available to winstore apps
---
src/win32/rand.c | 44 ++++++++------------------------------------
1 file changed, 8 insertions(+), 36 deletions(-)
diff --git a/src/win32/rand.c b/src/win32/rand.c
index 1aeb656..75466b7 100644
--- a/src/win32/rand.c
+++ b/src/win32/rand.c
@@ -27,11 +27,7 @@
#include <vlc_rand.h>
#if VLC_WINSTORE_APP
-# define COBJMACROS
-# define INITGUID
-# include <winstring.h>
-# include <roapi.h>
-# include <windows.security.cryptography.h>
+# include <bcrypt.h>
#else
# include <wincrypt.h>
#endif
@@ -58,38 +54,14 @@ void vlc_rand_bytes (void *buf, size_t len)
}
#if VLC_WINSTORE_APP
- static const WCHAR *className = L"Windows.Security.Cryptography.CryptographicBuffer";
- const UINT32 clen = wcslen(className);
-
- HSTRING hClassName = NULL;
- HSTRING_HEADER header;
- HRESULT hr = WindowsCreateStringReference(className, clen, &header, &hClassName);
- if (hr) {
- WindowsDeleteString(hClassName);
- return;
- }
-
- ICryptographicBufferStatics *cryptoStatics = NULL;
- hr = RoGetActivationFactory(hClassName, &IID_ICryptographicBufferStatics, (void**)&cryptoStatics);
- WindowsDeleteString(hClassName);
-
- if (hr)
- return;
-
- IBuffer *buffer = NULL;
- hr = ICryptographicBufferStatics_GenerateRandom(cryptoStatics, len, &buffer);
- if (hr) {
- ICryptographicBufferStatics_Release(cryptoStatics);
- return;
+ BCRYPT_ALG_HANDLE algo_handle;
+ NTSTATUS ret = BCryptOpenAlgorithmProvider(&algo_handle, BCRYPT_RNG_ALGORITHM,
+ MS_PRIMITIVE_PROVIDER, 0);
+ if (BCRYPT_SUCCESS(ret))
+ {
+ BCryptGenRandom(algo_handle, buf, len, 0);
+ BCryptCloseAlgorithmProvider(algo_handle, 0);
}
-
- UINT32 olength;
- unsigned char *rnd = NULL;
- hr = ICryptographicBufferStatics_CopyToByteArray(cryptoStatics, buffer, &olength, (BYTE**)&rnd);
- memcpy(buf, rnd, len);
-
- IBuffer_Release(buffer);
- ICryptographicBufferStatics_Release(cryptoStatics);
#else
HCRYPTPROV hProv;
/* acquire default encryption context */
--
2.10.1.windows.1
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