mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Added secur32-compile-fix
This commit is contained in:
parent
f85accadd5
commit
ab89820aa5
@ -261,6 +261,7 @@ patch_enable_all ()
|
||||
enable_qwave_QOSCreateHandle="$1"
|
||||
enable_riched20_Class_Tests="$1"
|
||||
enable_riched20_IText_Interface="$1"
|
||||
enable_secur32_compile_fix="$1"
|
||||
enable_server_ClipCursor="$1"
|
||||
enable_server_Desktop_Refcount="$1"
|
||||
enable_server_FileEndOfFileInformation="$1"
|
||||
@ -946,6 +947,9 @@ patch_enable ()
|
||||
riched20-IText_Interface)
|
||||
enable_riched20_IText_Interface="$2"
|
||||
;;
|
||||
secur32-compile-fix)
|
||||
enable_secur32_compile_fix="$2"
|
||||
;;
|
||||
server-ClipCursor)
|
||||
enable_server_ClipCursor="$2"
|
||||
;;
|
||||
@ -5569,6 +5573,18 @@ if test "$enable_riched20_IText_Interface" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset secur32-compile-fix
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/secur32/schannel_gnutls.c
|
||||
# |
|
||||
if test "$enable_secur32_compile_fix" -eq 1; then
|
||||
patch_apply secur32-compile-fix/0001-secur32-Fix-compile-error-on-older-gnutls.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Alistair Leslie-Hughes", "secur32: Fix compile error on older gnutls.", 2 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset server-ClipCursor
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -0,0 +1,75 @@
|
||||
From 44fc8063acc1575f4bbf7d8dfe3f519e8365b9cc Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 8 Feb 2019 09:53:13 +1100
|
||||
Subject: [PATCH v2] secur32: Fix compile error on older gnutls.
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/secur32/schannel_gnutls.c | 23 +++++++++++++++++++++--
|
||||
1 file changed, 21 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/secur32/schannel_gnutls.c b/dlls/secur32/schannel_gnutls.c
|
||||
index ddb10ac..d14e6f3 100644
|
||||
--- a/dlls/secur32/schannel_gnutls.c
|
||||
+++ b/dlls/secur32/schannel_gnutls.c
|
||||
@@ -54,6 +54,12 @@ static int (*pgnutls_cipher_get_block_size)(gnutls_cipher_algorithm_t);
|
||||
/* Not present in gnutls version < 3.4.0. */
|
||||
static int (*pgnutls_privkey_export_x509)(gnutls_privkey_t, gnutls_x509_privkey_t *);
|
||||
|
||||
+static int (*pgnutls_privkey_import_rsa_raw)(gnutls_privkey_t, const gnutls_datum_t *,
|
||||
+ const gnutls_datum_t *, const gnutls_datum_t *,
|
||||
+ const gnutls_datum_t *, const gnutls_datum_t *,
|
||||
+ const gnutls_datum_t *, const gnutls_datum_t *,
|
||||
+ const gnutls_datum_t *);
|
||||
+
|
||||
static void *libgnutls_handle;
|
||||
#define MAKE_FUNCPTR(f) static typeof(f) * p##f
|
||||
MAKE_FUNCPTR(gnutls_alert_get);
|
||||
@@ -79,7 +85,6 @@ MAKE_FUNCPTR(gnutls_perror);
|
||||
MAKE_FUNCPTR(gnutls_protocol_get_version);
|
||||
MAKE_FUNCPTR(gnutls_priority_set_direct);
|
||||
MAKE_FUNCPTR(gnutls_privkey_deinit);
|
||||
-MAKE_FUNCPTR(gnutls_privkey_import_rsa_raw);
|
||||
MAKE_FUNCPTR(gnutls_privkey_init);
|
||||
MAKE_FUNCPTR(gnutls_record_get_max_size);
|
||||
MAKE_FUNCPTR(gnutls_record_recv);
|
||||
@@ -138,6 +143,16 @@ static int compat_gnutls_privkey_export_x509(gnutls_privkey_t privkey, gnutls_x5
|
||||
return GNUTLS_E_UNKNOWN_PK_ALGORITHM;
|
||||
}
|
||||
|
||||
+static int compat_gnutls_privkey_import_rsa_raw(gnutls_privkey_t key, const gnutls_datum_t *p1,
|
||||
+ const gnutls_datum_t *p2, const gnutls_datum_t *p3,
|
||||
+ const gnutls_datum_t *p4, const gnutls_datum_t *p5,
|
||||
+ const gnutls_datum_t *p6, const gnutls_datum_t *p7,
|
||||
+ const gnutls_datum_t *p8)
|
||||
+{
|
||||
+ FIXME("\n");
|
||||
+ return GNUTLS_E_UNKNOWN_PK_ALGORITHM;
|
||||
+}
|
||||
+
|
||||
static ssize_t schan_pull_adapter(gnutls_transport_ptr_t transport,
|
||||
void *buff, size_t buff_len)
|
||||
{
|
||||
@@ -897,7 +912,6 @@ BOOL schan_imp_init(void)
|
||||
LOAD_FUNCPTR(gnutls_protocol_get_version)
|
||||
LOAD_FUNCPTR(gnutls_priority_set_direct)
|
||||
LOAD_FUNCPTR(gnutls_privkey_deinit)
|
||||
- LOAD_FUNCPTR(gnutls_privkey_import_rsa_raw)
|
||||
LOAD_FUNCPTR(gnutls_privkey_init)
|
||||
LOAD_FUNCPTR(gnutls_record_get_max_size);
|
||||
LOAD_FUNCPTR(gnutls_record_recv);
|
||||
@@ -924,6 +938,11 @@ BOOL schan_imp_init(void)
|
||||
WARN("gnutls_privkey_export_x509 not found\n");
|
||||
pgnutls_privkey_export_x509 = compat_gnutls_privkey_export_x509;
|
||||
}
|
||||
+ if (!(pgnutls_privkey_import_rsa_raw = wine_dlsym(libgnutls_handle, "gnutls_privkey_import_rsa_raw", NULL, 0)))
|
||||
+ {
|
||||
+ WARN("gnutls_privkey_import_rsa_raw not found\n");
|
||||
+ pgnutls_privkey_import_rsa_raw = compat_gnutls_privkey_import_rsa_raw;
|
||||
+ }
|
||||
|
||||
ret = pgnutls_global_init();
|
||||
if (ret != GNUTLS_E_SUCCESS)
|
||||
--
|
||||
1.9.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user