From fc1eb83a27ae1b94b7d59acadd1f315079d112b8 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Tue, 29 Jan 2019 18:33:33 -0600 Subject: [PATCH] crypt32-old_libgnutls: Add patch. --- ...32-Fix-compile-error-on-older-gnutls.patch | 30 +++++++++++++++++++ patches/patchinstall.sh | 16 ++++++++++ 2 files changed, 46 insertions(+) create mode 100644 patches/crypt32-old_libgnutls/0001-crypt32-Fix-compile-error-on-older-gnutls.patch diff --git a/patches/crypt32-old_libgnutls/0001-crypt32-Fix-compile-error-on-older-gnutls.patch b/patches/crypt32-old_libgnutls/0001-crypt32-Fix-compile-error-on-older-gnutls.patch new file mode 100644 index 00000000..3d0996ac --- /dev/null +++ b/patches/crypt32-old_libgnutls/0001-crypt32-Fix-compile-error-on-older-gnutls.patch @@ -0,0 +1,30 @@ +From 778d6ea39b0c49f5000efd401f1ab05ec64c7abc Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Wed, 30 Jan 2019 10:20:49 +1100 +Subject: [PATCH] crypt32: Fix compile error on older gnutls + +Signed-off-by: Alistair Leslie-Hughes +--- + dlls/crypt32/pfx.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/dlls/crypt32/pfx.c b/dlls/crypt32/pfx.c +index d824410..c4fb34d 100644 +--- a/dlls/crypt32/pfx.c ++++ b/dlls/crypt32/pfx.c +@@ -38,6 +38,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(crypt); + #ifdef SONAME_LIBGNUTLS + WINE_DECLARE_DEBUG_CHANNEL(winediag); + ++/* Not present in gnutls version < 3.0 */ ++int gnutls_pkcs12_simple_parse(gnutls_pkcs12_t p12, const char *password, ++ gnutls_x509_privkey_t *key, gnutls_x509_crt_t **chain, unsigned int *chain_len, ++ gnutls_x509_crt_t **extra_certs, unsigned int *extra_certs_len, ++ gnutls_x509_crl_t * crl, unsigned int flags); ++ + static void *libgnutls_handle; + #define MAKE_FUNCPTR(f) static typeof(f) * p##f + MAKE_FUNCPTR(gnutls_global_deinit); +-- +1.9.1 + diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 299eba93..ff837c09 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -103,6 +103,7 @@ patch_enable_all () enable_configure_Absolute_RPATH="$1" enable_crypt32_CMS_Certificates="$1" enable_crypt32_MS_Root_Certs="$1" + enable_crypt32_old_libgnutls="$1" enable_d2d1_ID2D1Factory1="$1" enable_d3d11_Deferred_Context="$1" enable_d3d8_ValidateShader="$1" @@ -473,6 +474,9 @@ patch_enable () crypt32-MS_Root_Certs) enable_crypt32_MS_Root_Certs="$2" ;; + crypt32-old_libgnutls) + enable_crypt32_old_libgnutls="$2" + ;; d2d1-ID2D1Factory1) enable_d2d1_ID2D1Factory1="$2" ;; @@ -2643,6 +2647,18 @@ if test "$enable_crypt32_MS_Root_Certs" -eq 1; then ) >> "$patchlist" fi +# Patchset crypt32-old_libgnutls +# | +# | Modified files: +# | * dlls/crypt32/pfx.c +# | +if test "$enable_crypt32_old_libgnutls" -eq 1; then + patch_apply crypt32-old_libgnutls/0001-crypt32-Fix-compile-error-on-older-gnutls.patch + ( + printf '%s\n' '+ { "Alistair Leslie-Hughes", "crypt32: Fix compile error on older gnutls.", 1 },'; + ) >> "$patchlist" +fi + # Patchset d2d1-ID2D1Factory1 # | # | This patchset fixes the following Wine bugs: