Updated bcrypt-ECDHSecretAgreement patchset

Correct build for macos
This commit is contained in:
Alistair Leslie-Hughes 2020-02-28 08:19:41 +11:00
parent 37e000145f
commit 57204d77d9

View File

@ -1,4 +1,4 @@
From 04dd441ef89d4b8e07e35ae1c62ecb65c673970a Mon Sep 17 00:00:00 2001
From 830d2641a7e23474b3ef4ee52e42e6b4f2cd388b Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Tue, 7 Jan 2020 14:22:49 -0600
Subject: [PATCH] bcrypt: Implement BCryptSecretAgreement with libgcrypt.
@ -11,12 +11,13 @@ Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
dlls/bcrypt/bcrypt_main.c | 86 +++++++++--
dlls/bcrypt/gcrypt.c | 264 ++++++++++++++++++++++++++++++++++
dlls/bcrypt/gnutls.c | 9 ++
dlls/bcrypt/macos.c | 6 +
dlls/bcrypt/tests/bcrypt.c | 2 +-
7 files changed, 378 insertions(+), 11 deletions(-)
8 files changed, 384 insertions(+), 11 deletions(-)
create mode 100644 dlls/bcrypt/gcrypt.c
diff --git a/configure.ac b/configure.ac
index dca0b165ba..cb6eedcdc9 100644
index 47d2b750c01..2dfa2ebcb51 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,6 +46,7 @@ AC_ARG_WITH(faudio, AS_HELP_STRING([--without-faudio],[do not use FAudio (XAu
@ -27,7 +28,7 @@ index dca0b165ba..cb6eedcdc9 100644
AC_ARG_WITH(gettext, AS_HELP_STRING([--without-gettext],[do not use gettext]))
AC_ARG_WITH(gettextpo, AS_HELP_STRING([--with-gettextpo],[use the GetTextPO library to rebuild po files]),
[if test "x$withval" = "xno"; then ac_cv_header_gettext_po_h=no; fi])
@@ -2050,6 +2051,19 @@ WINE_NOTICE_WITH(vkd3d,[test "x$ac_cv_lib_soname_vkd3d" = "x"],
@@ -1989,6 +1990,19 @@ WINE_NOTICE_WITH(vkd3d,[test "x$ac_cv_lib_soname_vkd3d" = "x"],
[vkd3d ${notice_platform}development files not found (or too old), Direct3D 12 won't be supported.])
test "x$ac_cv_lib_soname_vkd3d" != "x" || enable_d3d12=${enable_d3d12:-no}
@ -48,7 +49,7 @@ index dca0b165ba..cb6eedcdc9 100644
AC_SUBST(EXTRACFLAGS,"")
diff --git a/dlls/bcrypt/Makefile.in b/dlls/bcrypt/Makefile.in
index dd6d4a7664..ea3486a400 100644
index dd6d4a76640..ea3486a4002 100644
--- a/dlls/bcrypt/Makefile.in
+++ b/dlls/bcrypt/Makefile.in
@@ -5,6 +5,7 @@ EXTRAINCL = $(GNUTLS_CFLAGS)
@ -60,7 +61,7 @@ index dd6d4a7664..ea3486a400 100644
macos.c \
md2.c \
diff --git a/dlls/bcrypt/bcrypt_internal.h b/dlls/bcrypt/bcrypt_internal.h
index 5cc2c249da..b16dfbdcd2 100644
index 5cc2c249da8..b16dfbdcd2b 100644
--- a/dlls/bcrypt/bcrypt_internal.h
+++ b/dlls/bcrypt/bcrypt_internal.h
@@ -25,6 +25,9 @@
@ -103,7 +104,7 @@ index 5cc2c249da..b16dfbdcd2 100644
+
#endif /* __BCRYPT_INTERNAL_H */
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index c2939ea815..15b934247d 100644
index c2939ea815a..15b934247d8 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -1349,6 +1349,12 @@ NTSTATUS key_import_ecc( struct key *key, UCHAR *input, ULONG len )
@ -233,7 +234,7 @@ index c2939ea815..15b934247d 100644
}
diff --git a/dlls/bcrypt/gcrypt.c b/dlls/bcrypt/gcrypt.c
new file mode 100644
index 0000000000..d7ed6eeddf
index 00000000000..d7ed6eeddf3
--- /dev/null
+++ b/dlls/bcrypt/gcrypt.c
@@ -0,0 +1,264 @@
@ -502,7 +503,7 @@ index 0000000000..d7ed6eeddf
+}
+#endif
diff --git a/dlls/bcrypt/gnutls.c b/dlls/bcrypt/gnutls.c
index 1d78b9f4d1..59c98eed0c 100644
index 1d78b9f4d1f..59c98eed0cc 100644
--- a/dlls/bcrypt/gnutls.c
+++ b/dlls/bcrypt/gnutls.c
@@ -1297,4 +1297,13 @@ NTSTATUS key_destroy( struct key *key )
@ -519,8 +520,23 @@ index 1d78b9f4d1..59c98eed0c 100644
+#endif
+
#endif
diff --git a/dlls/bcrypt/macos.c b/dlls/bcrypt/macos.c
index 9ff9772c15a..4851603819c 100644
--- a/dlls/bcrypt/macos.c
+++ b/dlls/bcrypt/macos.c
@@ -268,4 +268,10 @@ NTSTATUS key_destroy( struct key *key )
heap_free( key );
return STATUS_SUCCESS;
}
+
+NTSTATUS compute_secret_ecc (struct key *pubkey_in, struct key *privkey_in, struct secret *secret)
+{
+ ERR( "support for secrets not available at build time\n" );
+ return STATUS_NOT_IMPLEMENTED;
+}
#endif
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index f7404057fa..d9509f2c49 100644
index f7404057fa8..d9509f2c49b 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -2067,7 +2067,7 @@ static void test_ECDH(void)
@ -533,5 +549,5 @@ index f7404057fa..d9509f2c49 100644
if (status != STATUS_SUCCESS)
{
--
2.24.1
2.17.1