mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
bcrypt-Improvements: Add missing ncrypt forwards.
This commit is contained in:
parent
b9514dd7b0
commit
6db72e951e
@ -1,4 +1,4 @@
|
||||
From b6efa0b8bb1bba73863ca985c13d46a5eaec4198 Mon Sep 17 00:00:00 2001
|
||||
From c178117abacbf8644ae05429999ff8e8f8585a7e Mon Sep 17 00:00:00 2001
|
||||
From: Hans Leidekker <hans@codeweavers.com>
|
||||
Date: Mon, 19 Dec 2016 19:38:52 +0100
|
||||
Subject: bcrypt: Add AES provider.
|
||||
@ -7,11 +7,12 @@ Subject: bcrypt: Add AES provider.
|
||||
dlls/bcrypt/bcrypt.spec | 10 +-
|
||||
dlls/bcrypt/bcrypt_main.c | 347 ++++++++++++++++++++++++++++++++++++++++++++-
|
||||
dlls/bcrypt/tests/bcrypt.c | 18 +--
|
||||
dlls/ncrypt/ncrypt.spec | 10 +-
|
||||
include/bcrypt.h | 3 +
|
||||
4 files changed, 352 insertions(+), 26 deletions(-)
|
||||
5 files changed, 357 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec
|
||||
index e299fe0..962953e 100644
|
||||
index e299fe0cce8..962953e509b 100644
|
||||
--- a/dlls/bcrypt/bcrypt.spec
|
||||
+++ b/dlls/bcrypt/bcrypt.spec
|
||||
@@ -5,15 +5,15 @@
|
||||
@ -52,7 +53,7 @@ index e299fe0..962953e 100644
|
||||
@ stub BCryptUnregisterConfigChangeNotify
|
||||
@ stub BCryptUnregisterProvider
|
||||
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
|
||||
index 6023c94..937bdf7 100644
|
||||
index 6023c942e49..5e066283f6e 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -49,6 +49,10 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag);
|
||||
@ -498,7 +499,7 @@ index 6023c94..937bdf7 100644
|
||||
{
|
||||
switch (reason)
|
||||
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
|
||||
index 3e41335..2668153 100644
|
||||
index 422f2cfd340..d2df74ed919 100644
|
||||
--- a/dlls/bcrypt/tests/bcrypt.c
|
||||
+++ b/dlls/bcrypt/tests/bcrypt.c
|
||||
@@ -780,7 +780,7 @@ static void test_aes(void)
|
||||
@ -510,7 +511,7 @@ index 3e41335..2668153 100644
|
||||
alg = NULL;
|
||||
ret = pBCryptOpenAlgorithmProvider(&alg, BCRYPT_AES_ALGORITHM, MS_PRIMITIVE_PROVIDER, 0);
|
||||
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
|
||||
@@ -828,7 +828,6 @@ todo_wine {
|
||||
@@ -814,7 +814,6 @@ todo_wine {
|
||||
ret = pBCryptCloseAlgorithmProvider(alg, 0);
|
||||
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
|
||||
}
|
||||
@ -518,7 +519,7 @@ index 3e41335..2668153 100644
|
||||
|
||||
static void test_BCryptGenerateSymmetricKey(void)
|
||||
{
|
||||
@@ -847,11 +846,6 @@ static void test_BCryptGenerateSymmetricKey(void)
|
||||
@@ -833,11 +832,6 @@ static void test_BCryptGenerateSymmetricKey(void)
|
||||
NTSTATUS ret;
|
||||
|
||||
ret = pBCryptOpenAlgorithmProvider(&aes, BCRYPT_AES_ALGORITHM, NULL, 0);
|
||||
@ -530,7 +531,7 @@ index 3e41335..2668153 100644
|
||||
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
|
||||
|
||||
len = size = 0xdeadbeef;
|
||||
@@ -936,11 +930,6 @@ static void test_BCryptEncrypt(void)
|
||||
@@ -922,11 +916,6 @@ static void test_BCryptEncrypt(void)
|
||||
NTSTATUS ret;
|
||||
|
||||
ret = pBCryptOpenAlgorithmProvider(&aes, BCRYPT_AES_ALGORITHM, NULL, 0);
|
||||
@ -542,7 +543,7 @@ index 3e41335..2668153 100644
|
||||
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
|
||||
|
||||
len = 0xdeadbeef;
|
||||
@@ -1027,11 +1016,6 @@ static void test_BCryptDecrypt(void)
|
||||
@@ -1013,11 +1002,6 @@ static void test_BCryptDecrypt(void)
|
||||
NTSTATUS ret;
|
||||
|
||||
ret = pBCryptOpenAlgorithmProvider(&aes, BCRYPT_AES_ALGORITHM, NULL, 0);
|
||||
@ -554,8 +555,51 @@ index 3e41335..2668153 100644
|
||||
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
|
||||
|
||||
len = 0xdeadbeef;
|
||||
diff --git a/dlls/ncrypt/ncrypt.spec b/dlls/ncrypt/ncrypt.spec
|
||||
index 04127608d68..60b7eb37075 100644
|
||||
--- a/dlls/ncrypt/ncrypt.spec
|
||||
+++ b/dlls/ncrypt/ncrypt.spec
|
||||
@@ -5,17 +5,17 @@
|
||||
@ stub BCryptConfigureContextFunction
|
||||
@ stub BCryptCreateContext
|
||||
@ stdcall BCryptCreateHash(ptr ptr ptr long ptr long long) bcrypt.BCryptCreateHash
|
||||
-@ stub BCryptDecrypt
|
||||
+@ stdcall BCryptDecrypt(ptr ptr long ptr ptr long ptr long ptr long) bcrypt.BCryptDecrypt
|
||||
@ stub BCryptDeleteContext
|
||||
@ stub BCryptDeriveKey
|
||||
@ stub BCryptDeriveKeyCapi
|
||||
@ stub BCryptDeriveKeyPBKDF2
|
||||
@ stdcall BCryptDestroyHash(ptr) bcrypt.BCryptDestroyHash
|
||||
-@ stub BCryptDestroyKey
|
||||
+@ stdcall BCryptDestroyKey(ptr) bcrypt.BCryptDestroyKey
|
||||
@ stub BCryptDestroySecret
|
||||
@ stub BCryptDuplicateHash
|
||||
@ stub BCryptDuplicateKey
|
||||
-@ stub BCryptEncrypt
|
||||
+@ stdcall BCryptEncrypt(ptr ptr long ptr ptr long ptr long ptr long) bcrypt.BCryptEncrypt
|
||||
@ stdcall BCryptEnumAlgorithms(long ptr ptr long) bcrypt.BCryptEnumAlgorithms
|
||||
@ stub BCryptEnumContextFunctionProviders
|
||||
@ stub BCryptEnumContextFunctions
|
||||
@@ -28,7 +28,7 @@
|
||||
@ stub BCryptFreeBuffer
|
||||
@ stdcall BCryptGenRandom(ptr ptr long long) bcrypt.BCryptGenRandom
|
||||
@ stub BCryptGenerateKeyPair
|
||||
-@ stub BCryptGenerateSymmetricKey
|
||||
+@ stdcall BCryptGenerateSymmetricKey(ptr ptr ptr long ptr long long) bcrypt.BCryptGenerateSymmetricKey
|
||||
@ stdcall BCryptGetFipsAlgorithmMode(ptr) bcrypt.BCryptGetFipsAlgorithmMode
|
||||
@ stdcall BCryptGetProperty(ptr wstr ptr long ptr long) bcrypt.BCryptGetProperty
|
||||
@ stdcall BCryptHash(ptr ptr long ptr long ptr long) bcrypt.BCryptHash
|
||||
@@ -49,7 +49,7 @@
|
||||
@ stub BCryptSecretAgreement
|
||||
@ stub BCryptSetAuditingInterface
|
||||
@ stub BCryptSetContextFunctionProperty
|
||||
-@ stub BCryptSetProperty
|
||||
+@ stdcall BCryptSetProperty(ptr wstr ptr long long) bcrypt.BCryptSetProperty
|
||||
@ stub BCryptSignHash
|
||||
@ stub BCryptUnregisterConfigChangeNotify
|
||||
@ stub BCryptUnregisterProvider
|
||||
diff --git a/include/bcrypt.h b/include/bcrypt.h
|
||||
index 05d0691..6af85e3 100644
|
||||
index 05d0691f9c3..6af85e36143 100644
|
||||
--- a/include/bcrypt.h
|
||||
+++ b/include/bcrypt.h
|
||||
@@ -74,6 +74,9 @@ typedef LONG NTSTATUS;
|
||||
@ -569,5 +613,5 @@ index 05d0691..6af85e3 100644
|
||||
typedef struct _BCRYPT_ALGORITHM_IDENTIFIER
|
||||
{
|
||||
--
|
||||
2.9.0
|
||||
2.11.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From ecff30df4deadc0df006a880a5528343a4ab788f Mon Sep 17 00:00:00 2001
|
||||
From 3439b4e5a1fd05c4fb68491c3814de2581e8a5aa Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 20 Dec 2016 02:36:57 +0100
|
||||
Subject: bcrypt: Add internal fallback implementation for hash calculations.
|
||||
@ -17,7 +17,7 @@ Subject: bcrypt: Add internal fallback implementation for hash calculations.
|
||||
create mode 100644 dlls/bcrypt/sha512.c
|
||||
|
||||
diff --git a/dlls/bcrypt/Makefile.in b/dlls/bcrypt/Makefile.in
|
||||
index ef9d7ea..38753bd 100644
|
||||
index ef9d7ead6bc..f54fc5cd482 100644
|
||||
--- a/dlls/bcrypt/Makefile.in
|
||||
+++ b/dlls/bcrypt/Makefile.in
|
||||
@@ -4,6 +4,9 @@ IMPORTLIB = bcrypt
|
||||
@ -27,13 +27,13 @@ index ef9d7ea..38753bd 100644
|
||||
- bcrypt_main.c
|
||||
+ bcrypt_main.c \
|
||||
+ sha256.c \
|
||||
+ sha512.c \
|
||||
+ sha384.c
|
||||
+ sha384.c \
|
||||
+ sha512.c
|
||||
|
||||
RC_SRCS = version.rc
|
||||
diff --git a/dlls/bcrypt/bcrypt_internal.h b/dlls/bcrypt/bcrypt_internal.h
|
||||
new file mode 100644
|
||||
index 0000000..8a8f6d1
|
||||
index 00000000000..8a8f6d170c4
|
||||
--- /dev/null
|
||||
+++ b/dlls/bcrypt/bcrypt_internal.h
|
||||
@@ -0,0 +1,79 @@
|
||||
@ -117,7 +117,7 @@ index 0000000..8a8f6d1
|
||||
+
|
||||
+#endif /* __BCRYPT_INTERNAL_H */
|
||||
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
|
||||
index af2314a..9441cf0 100644
|
||||
index 1f22063dbda..fbaece21f47 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -36,6 +36,8 @@
|
||||
@ -251,7 +251,7 @@ index af2314a..9441cf0 100644
|
||||
|
||||
diff --git a/dlls/bcrypt/sha256.c b/dlls/bcrypt/sha256.c
|
||||
new file mode 100644
|
||||
index 0000000..48c4a48
|
||||
index 00000000000..48c4a48d031
|
||||
--- /dev/null
|
||||
+++ b/dlls/bcrypt/sha256.c
|
||||
@@ -0,0 +1,169 @@
|
||||
@ -426,7 +426,7 @@ index 0000000..48c4a48
|
||||
+}
|
||||
diff --git a/dlls/bcrypt/sha384.c b/dlls/bcrypt/sha384.c
|
||||
new file mode 100644
|
||||
index 0000000..81e7e08
|
||||
index 00000000000..81e7e08fd07
|
||||
--- /dev/null
|
||||
+++ b/dlls/bcrypt/sha384.c
|
||||
@@ -0,0 +1,41 @@
|
||||
@ -473,7 +473,7 @@ index 0000000..81e7e08
|
||||
+}
|
||||
diff --git a/dlls/bcrypt/sha512.c b/dlls/bcrypt/sha512.c
|
||||
new file mode 100644
|
||||
index 0000000..fdd7867
|
||||
index 00000000000..fdd7867eab7
|
||||
--- /dev/null
|
||||
+++ b/dlls/bcrypt/sha512.c
|
||||
@@ -0,0 +1,191 @@
|
||||
@ -669,5 +669,5 @@ index 0000000..fdd7867
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.9.0
|
||||
2.11.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 9331e2a78e8ec0ba29ed1041a9f851ffd39cc249 Mon Sep 17 00:00:00 2001
|
||||
From 3dc21336baced97a110773ac9e72db210a56af82 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 20 Dec 2016 03:59:19 +0100
|
||||
Subject: bcrypt: Implement BCryptDuplicateHash.
|
||||
@ -7,10 +7,11 @@ FIXME: Should we check for NULL pointers?
|
||||
---
|
||||
dlls/bcrypt/bcrypt.spec | 2 +-
|
||||
dlls/bcrypt/bcrypt_main.c | 18 ++++++++++++++++++
|
||||
2 files changed, 19 insertions(+), 1 deletion(-)
|
||||
dlls/ncrypt/ncrypt.spec | 2 +-
|
||||
3 files changed, 20 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec
|
||||
index 962953e..9ecd21d 100644
|
||||
index 962953e509b..9ecd21d767c 100644
|
||||
--- a/dlls/bcrypt/bcrypt.spec
|
||||
+++ b/dlls/bcrypt/bcrypt.spec
|
||||
@@ -11,7 +11,7 @@
|
||||
@ -23,7 +24,7 @@ index 962953e..9ecd21d 100644
|
||||
@ stdcall BCryptEncrypt(ptr ptr long ptr ptr long ptr long ptr long)
|
||||
@ stdcall BCryptEnumAlgorithms(long ptr ptr long)
|
||||
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
|
||||
index 3e2b22d..944a9ea 100644
|
||||
index 4f09948096c..3eb0135b37c 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -672,6 +672,24 @@ end:
|
||||
@ -51,6 +52,19 @@ index 3e2b22d..944a9ea 100644
|
||||
NTSTATUS WINAPI BCryptDestroyHash( BCRYPT_HASH_HANDLE handle )
|
||||
{
|
||||
struct hash *hash = handle;
|
||||
diff --git a/dlls/ncrypt/ncrypt.spec b/dlls/ncrypt/ncrypt.spec
|
||||
index 60b7eb37075..1a78853bf49 100644
|
||||
--- a/dlls/ncrypt/ncrypt.spec
|
||||
+++ b/dlls/ncrypt/ncrypt.spec
|
||||
@@ -13,7 +13,7 @@
|
||||
@ stdcall BCryptDestroyHash(ptr) bcrypt.BCryptDestroyHash
|
||||
@ stdcall BCryptDestroyKey(ptr) bcrypt.BCryptDestroyKey
|
||||
@ stub BCryptDestroySecret
|
||||
-@ stub BCryptDuplicateHash
|
||||
+@ stdcall BCryptDuplicateHash(ptr ptr ptr long long) bcrypt.BCryptDuplicateHash
|
||||
@ stub BCryptDuplicateKey
|
||||
@ stdcall BCryptEncrypt(ptr ptr long ptr ptr long ptr long ptr long) bcrypt.BCryptEncrypt
|
||||
@ stdcall BCryptEnumAlgorithms(long ptr ptr long) bcrypt.BCryptEnumAlgorithms
|
||||
--
|
||||
2.9.0
|
||||
2.11.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From e930551dfa4e0bb97db71d056a4ed59f9e459e01 Mon Sep 17 00:00:00 2001
|
||||
From 6d590beb24ef04948fe8e05fff3a72c1d415a7c1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Mon, 26 Dec 2016 08:28:24 +0100
|
||||
Subject: bcrypt: Implement BCryptDuplicateKey.
|
||||
@ -6,10 +6,11 @@ Subject: bcrypt: Implement BCryptDuplicateKey.
|
||||
---
|
||||
dlls/bcrypt/bcrypt.spec | 2 +-
|
||||
dlls/bcrypt/bcrypt_main.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 50 insertions(+), 1 deletion(-)
|
||||
dlls/ncrypt/ncrypt.spec | 2 +-
|
||||
3 files changed, 51 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec
|
||||
index 9ecd21d..f5911d2 100644
|
||||
index 9ecd21d767c..f5911d2cd40 100644
|
||||
--- a/dlls/bcrypt/bcrypt.spec
|
||||
+++ b/dlls/bcrypt/bcrypt.spec
|
||||
@@ -12,7 +12,7 @@
|
||||
@ -22,7 +23,7 @@ index 9ecd21d..f5911d2 100644
|
||||
@ stdcall BCryptEnumAlgorithms(long ptr ptr long)
|
||||
@ stub BCryptEnumContextFunctionProviders
|
||||
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
|
||||
index 198b010..37d6909 100644
|
||||
index 198b010b27e..37d69095f7a 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -915,6 +915,24 @@ static NTSTATUS key_init( struct key *key, struct algorithm *alg, UCHAR *secret,
|
||||
@ -95,6 +96,19 @@ index 198b010..37d6909 100644
|
||||
NTSTATUS WINAPI BCryptDestroyKey( BCRYPT_KEY_HANDLE handle )
|
||||
{
|
||||
struct key *key = handle;
|
||||
diff --git a/dlls/ncrypt/ncrypt.spec b/dlls/ncrypt/ncrypt.spec
|
||||
index 1a78853bf49..b14a332e18f 100644
|
||||
--- a/dlls/ncrypt/ncrypt.spec
|
||||
+++ b/dlls/ncrypt/ncrypt.spec
|
||||
@@ -14,7 +14,7 @@
|
||||
@ stdcall BCryptDestroyKey(ptr) bcrypt.BCryptDestroyKey
|
||||
@ stub BCryptDestroySecret
|
||||
@ stdcall BCryptDuplicateHash(ptr ptr ptr long long) bcrypt.BCryptDuplicateHash
|
||||
-@ stub BCryptDuplicateKey
|
||||
+@ stdcall BCryptDuplicateKey(ptr ptr ptr long long) bcrypt.BCryptDuplicateKey
|
||||
@ stdcall BCryptEncrypt(ptr ptr long ptr ptr long ptr long ptr long) bcrypt.BCryptEncrypt
|
||||
@ stdcall BCryptEnumAlgorithms(long ptr ptr long) bcrypt.BCryptEnumAlgorithms
|
||||
@ stub BCryptEnumContextFunctionProviders
|
||||
--
|
||||
2.9.0
|
||||
2.11.0
|
||||
|
||||
|
@ -3016,8 +3016,8 @@ fi
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/bcrypt/Makefile.in, dlls/bcrypt/bcrypt.spec, dlls/bcrypt/bcrypt_internal.h, dlls/bcrypt/bcrypt_main.c,
|
||||
# | dlls/bcrypt/sha256.c, dlls/bcrypt/sha384.c, dlls/bcrypt/sha512.c, dlls/bcrypt/tests/bcrypt.c, include/bcrypt.h,
|
||||
# | include/ntstatus.h
|
||||
# | dlls/bcrypt/sha256.c, dlls/bcrypt/sha384.c, dlls/bcrypt/sha512.c, dlls/bcrypt/tests/bcrypt.c, dlls/ncrypt/ncrypt.spec,
|
||||
# | include/bcrypt.h, include/ntstatus.h
|
||||
# |
|
||||
if test "$enable_bcrypt_Improvements" -eq 1; then
|
||||
patch_apply bcrypt-Improvements/0001-bcrypt-Add-AES-provider.patch
|
||||
|
Loading…
Reference in New Issue
Block a user