mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Rebase against 4b1445940d47870895b7fa87b7d69d12abe701ef.
This commit is contained in:
parent
ce5620a1a4
commit
543b9eaae1
@ -1,18 +1,18 @@
|
||||
From 6af9d620b8e766dbb45ac4237e392c752cd69f64 Mon Sep 17 00:00:00 2001
|
||||
From b05734fe9746e5dbbfcf248b2b892d6e09006956 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.
|
||||
|
||||
---
|
||||
dlls/bcrypt/bcrypt.spec | 10 +-
|
||||
dlls/bcrypt/bcrypt_main.c | 346 ++++++++++++++++++++++++++++++++++++++++++++-
|
||||
dlls/bcrypt/bcrypt_main.c | 353 ++++++++++++++++++++++++++++++++++++++++++++-
|
||||
dlls/bcrypt/tests/bcrypt.c | 18 +--
|
||||
dlls/ncrypt/ncrypt.spec | 10 +-
|
||||
include/bcrypt.h | 3 +
|
||||
5 files changed, 357 insertions(+), 30 deletions(-)
|
||||
5 files changed, 361 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec
|
||||
index e299fe0cce8..962953e509b 100644
|
||||
index a1cce4423dc..9ecd21d767c 100644
|
||||
--- a/dlls/bcrypt/bcrypt.spec
|
||||
+++ b/dlls/bcrypt/bcrypt.spec
|
||||
@@ -5,15 +5,15 @@
|
||||
@ -27,7 +27,7 @@ index e299fe0cce8..962953e509b 100644
|
||||
-@ stub BCryptDestroyKey
|
||||
+@ stdcall BCryptDestroyKey(ptr)
|
||||
@ stub BCryptDestroySecret
|
||||
@ stub BCryptDuplicateHash
|
||||
@ stdcall BCryptDuplicateHash(ptr ptr ptr long long)
|
||||
@ stub BCryptDuplicateKey
|
||||
-@ stub BCryptEncrypt
|
||||
+@ stdcall BCryptEncrypt(ptr ptr long ptr ptr long ptr long ptr long)
|
||||
@ -53,7 +53,7 @@ index e299fe0cce8..962953e509b 100644
|
||||
@ stub BCryptUnregisterConfigChangeNotify
|
||||
@ stub BCryptUnregisterProvider
|
||||
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
|
||||
index cf4e3c6ccc3..b28699c26d5 100644
|
||||
index 80d7ddb9466..247b3dc7327 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -51,6 +51,10 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag);
|
||||
@ -94,15 +94,15 @@ index cf4e3c6ccc3..b28699c26d5 100644
|
||||
ALG_ID_MD5,
|
||||
ALG_ID_RNG,
|
||||
ALG_ID_SHA1,
|
||||
@@ -151,6 +161,7 @@ static const struct {
|
||||
@@ -152,6 +162,7 @@ static const struct {
|
||||
ULONG block_bits;
|
||||
const WCHAR *alg_name;
|
||||
} alg_props[] = {
|
||||
+ /* ALG_ID_AES */ { 0, 0, BCRYPT_AES_ALGORITHM },
|
||||
/* ALG_ID_MD5 */ { 16, 512, BCRYPT_MD5_ALGORITHM },
|
||||
/* ALG_ID_RNG */ { 0, 0, BCRYPT_RNG_ALGORITHM },
|
||||
/* ALG_ID_SHA1 */ { 20, 512, BCRYPT_SHA1_ALGORITHM },
|
||||
@@ -209,11 +220,10 @@ NTSTATUS WINAPI BCryptGenRandom(BCRYPT_ALG_HANDLE handle, UCHAR *buffer, ULONG c
|
||||
+ /* ALG_ID_AES */ { 654, 0, 0, BCRYPT_AES_ALGORITHM },
|
||||
/* ALG_ID_MD5 */ { 274, 16, 512, BCRYPT_MD5_ALGORITHM },
|
||||
/* ALG_ID_RNG */ { 0, 0, 0, BCRYPT_RNG_ALGORITHM },
|
||||
/* ALG_ID_SHA1 */ { 278, 20, 512, BCRYPT_SHA1_ALGORITHM },
|
||||
@@ -210,11 +221,10 @@ NTSTATUS WINAPI BCryptGenRandom(BCRYPT_ALG_HANDLE handle, UCHAR *buffer, ULONG c
|
||||
|
||||
NTSTATUS WINAPI BCryptOpenAlgorithmProvider( BCRYPT_ALG_HANDLE *handle, LPCWSTR id, LPCWSTR implementation, DWORD flags )
|
||||
{
|
||||
@ -115,7 +115,7 @@ index cf4e3c6ccc3..b28699c26d5 100644
|
||||
TRACE( "%p, %s, %s, %08x\n", handle, wine_dbgstr_w(id), wine_dbgstr_w(implementation), flags );
|
||||
|
||||
if (!handle || !id) return STATUS_INVALID_PARAMETER;
|
||||
@@ -223,9 +233,10 @@ NTSTATUS WINAPI BCryptOpenAlgorithmProvider( BCRYPT_ALG_HANDLE *handle, LPCWSTR
|
||||
@@ -224,9 +234,10 @@ NTSTATUS WINAPI BCryptOpenAlgorithmProvider( BCRYPT_ALG_HANDLE *handle, LPCWSTR
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
@ -127,40 +127,36 @@ index cf4e3c6ccc3..b28699c26d5 100644
|
||||
else if (!strcmpW( id, BCRYPT_SHA256_ALGORITHM )) alg_id = ALG_ID_SHA256;
|
||||
else if (!strcmpW( id, BCRYPT_SHA384_ALGORITHM )) alg_id = ALG_ID_SHA384;
|
||||
else if (!strcmpW( id, BCRYPT_SHA512_ALGORITHM )) alg_id = ALG_ID_SHA512;
|
||||
@@ -387,12 +398,19 @@ struct hash
|
||||
@@ -388,6 +399,8 @@ struct hash
|
||||
struct hash_impl inner;
|
||||
};
|
||||
|
||||
+#ifdef _WIN64
|
||||
+#define OBJECT_LENGTH_AES 654
|
||||
+#else
|
||||
+#define OBJECT_LENGTH_AES 618
|
||||
+#endif
|
||||
#define OBJECT_LENGTH_MD5 274
|
||||
#define OBJECT_LENGTH_SHA1 278
|
||||
#define OBJECT_LENGTH_SHA256 286
|
||||
#define OBJECT_LENGTH_SHA384 382
|
||||
#define OBJECT_LENGTH_SHA512 382
|
||||
|
||||
+#define BLOCK_LENGTH_AES 16
|
||||
+
|
||||
static NTSTATUS generic_alg_property( enum alg_id id, const WCHAR *prop, UCHAR *buf, ULONG size, ULONG *ret_size )
|
||||
{
|
||||
if (!strcmpW( prop, BCRYPT_HASH_LENGTH ))
|
||||
@@ -429,6 +447,34 @@ static NTSTATUS get_alg_property( enum alg_id id, const WCHAR *prop, UCHAR *buf,
|
||||
if (!strcmpW( prop, BCRYPT_OBJECT_LENGTH ))
|
||||
@@ -432,9 +445,43 @@ static NTSTATUS get_alg_property( enum alg_id id, const WCHAR *prop, UCHAR *buf,
|
||||
NTSTATUS status;
|
||||
|
||||
switch (id)
|
||||
{
|
||||
status = generic_alg_property( id, prop, buf, size, ret_size );
|
||||
- if (status == STATUS_NOT_IMPLEMENTED)
|
||||
- FIXME( "unsupported property %s\n", debugstr_w(prop) );
|
||||
- return status;
|
||||
+ if (status != STATUS_NOT_IMPLEMENTED)
|
||||
+ return status;
|
||||
+
|
||||
+ switch (id)
|
||||
+ {
|
||||
+ case ALG_ID_AES:
|
||||
+ if (!strcmpW( prop, BCRYPT_BLOCK_LENGTH ))
|
||||
+ {
|
||||
+ value = BLOCK_LENGTH_AES;
|
||||
+ break;
|
||||
+ }
|
||||
+ if (!strcmpW( prop, BCRYPT_OBJECT_LENGTH ))
|
||||
+ {
|
||||
+ value = OBJECT_LENGTH_AES;
|
||||
+ break;
|
||||
+ *ret_size = sizeof(ULONG);
|
||||
+ if (size < sizeof(ULONG))
|
||||
+ return STATUS_BUFFER_TOO_SMALL;
|
||||
+ if (buf)
|
||||
+ *(ULONG *)buf = BLOCK_LENGTH_AES;
|
||||
+ return STATUS_SUCCESS;
|
||||
+ }
|
||||
+ if (!strcmpW( prop, BCRYPT_CHAINING_MODE ))
|
||||
+ {
|
||||
@ -176,13 +172,18 @@ index cf4e3c6ccc3..b28699c26d5 100644
|
||||
+ return STATUS_BUFFER_TOO_SMALL;
|
||||
+ }
|
||||
+ }
|
||||
+ FIXME( "unsupported aes algorithm property %s\n", debugstr_w(prop) );
|
||||
+ return STATUS_NOT_IMPLEMENTED;
|
||||
+ break;
|
||||
+
|
||||
case ALG_ID_MD5:
|
||||
if (!strcmpW( prop, BCRYPT_OBJECT_LENGTH ))
|
||||
{
|
||||
@@ -532,6 +578,13 @@ NTSTATUS WINAPI BCryptGetProperty( BCRYPT_HANDLE handle, LPCWSTR prop, UCHAR *bu
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ FIXME( "unsupported property %s\n", debugstr_w(prop) );
|
||||
+ return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
static NTSTATUS get_hash_property( enum alg_id id, const WCHAR *prop, UCHAR *buf, ULONG size, ULONG *ret_size )
|
||||
@@ -474,6 +521,13 @@ NTSTATUS WINAPI BCryptGetProperty( BCRYPT_HANDLE handle, LPCWSTR prop, UCHAR *bu
|
||||
}
|
||||
}
|
||||
|
||||
@ -196,7 +197,7 @@ index cf4e3c6ccc3..b28699c26d5 100644
|
||||
NTSTATUS WINAPI BCryptCreateHash( BCRYPT_ALG_HANDLE algorithm, BCRYPT_HASH_HANDLE *handle, UCHAR *object, ULONG objectlen,
|
||||
UCHAR *secret, ULONG secretlen, ULONG flags )
|
||||
{
|
||||
@@ -670,6 +723,293 @@ NTSTATUS WINAPI BCryptHash( BCRYPT_ALG_HANDLE algorithm, UCHAR *secret, ULONG se
|
||||
@@ -632,6 +686,293 @@ NTSTATUS WINAPI BCryptHash( BCRYPT_ALG_HANDLE algorithm, UCHAR *secret, ULONG se
|
||||
return BCryptDestroyHash( handle );
|
||||
}
|
||||
|
||||
@ -491,10 +492,10 @@ index cf4e3c6ccc3..b28699c26d5 100644
|
||||
{
|
||||
switch (reason)
|
||||
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
|
||||
index 422f2cfd340..d2df74ed919 100644
|
||||
index 42312b45b78..4d5891b461b 100644
|
||||
--- a/dlls/bcrypt/tests/bcrypt.c
|
||||
+++ b/dlls/bcrypt/tests/bcrypt.c
|
||||
@@ -780,7 +780,7 @@ static void test_aes(void)
|
||||
@@ -704,7 +704,7 @@ static void test_aes(void)
|
||||
ULONG size, len;
|
||||
UCHAR mode[64];
|
||||
NTSTATUS ret;
|
||||
@ -503,7 +504,7 @@ index 422f2cfd340..d2df74ed919 100644
|
||||
alg = NULL;
|
||||
ret = pBCryptOpenAlgorithmProvider(&alg, BCRYPT_AES_ALGORITHM, MS_PRIMITIVE_PROVIDER, 0);
|
||||
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
|
||||
@@ -814,7 +814,6 @@ todo_wine {
|
||||
@@ -738,7 +738,6 @@ todo_wine {
|
||||
ret = pBCryptCloseAlgorithmProvider(alg, 0);
|
||||
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
|
||||
}
|
||||
@ -511,7 +512,7 @@ index 422f2cfd340..d2df74ed919 100644
|
||||
|
||||
static void test_BCryptGenerateSymmetricKey(void)
|
||||
{
|
||||
@@ -833,11 +832,6 @@ static void test_BCryptGenerateSymmetricKey(void)
|
||||
@@ -757,11 +756,6 @@ static void test_BCryptGenerateSymmetricKey(void)
|
||||
NTSTATUS ret;
|
||||
|
||||
ret = pBCryptOpenAlgorithmProvider(&aes, BCRYPT_AES_ALGORITHM, NULL, 0);
|
||||
@ -523,7 +524,7 @@ index 422f2cfd340..d2df74ed919 100644
|
||||
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
|
||||
|
||||
len = size = 0xdeadbeef;
|
||||
@@ -922,11 +916,6 @@ static void test_BCryptEncrypt(void)
|
||||
@@ -846,11 +840,6 @@ static void test_BCryptEncrypt(void)
|
||||
NTSTATUS ret;
|
||||
|
||||
ret = pBCryptOpenAlgorithmProvider(&aes, BCRYPT_AES_ALGORITHM, NULL, 0);
|
||||
@ -535,7 +536,7 @@ index 422f2cfd340..d2df74ed919 100644
|
||||
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
|
||||
|
||||
len = 0xdeadbeef;
|
||||
@@ -1013,11 +1002,6 @@ static void test_BCryptDecrypt(void)
|
||||
@@ -937,11 +926,6 @@ static void test_BCryptDecrypt(void)
|
||||
NTSTATUS ret;
|
||||
|
||||
ret = pBCryptOpenAlgorithmProvider(&aes, BCRYPT_AES_ALGORITHM, NULL, 0);
|
||||
@ -548,7 +549,7 @@ index 422f2cfd340..d2df74ed919 100644
|
||||
|
||||
len = 0xdeadbeef;
|
||||
diff --git a/dlls/ncrypt/ncrypt.spec b/dlls/ncrypt/ncrypt.spec
|
||||
index 04127608d68..60b7eb37075 100644
|
||||
index 6e871a5d6b8..1a78853bf49 100644
|
||||
--- a/dlls/ncrypt/ncrypt.spec
|
||||
+++ b/dlls/ncrypt/ncrypt.spec
|
||||
@@ -5,17 +5,17 @@
|
||||
@ -565,7 +566,7 @@ index 04127608d68..60b7eb37075 100644
|
||||
-@ stub BCryptDestroyKey
|
||||
+@ stdcall BCryptDestroyKey(ptr) bcrypt.BCryptDestroyKey
|
||||
@ stub BCryptDestroySecret
|
||||
@ stub BCryptDuplicateHash
|
||||
@ stdcall BCryptDuplicateHash(ptr ptr ptr long long) bcrypt.BCryptDuplicateHash
|
||||
@ stub BCryptDuplicateKey
|
||||
-@ stub BCryptEncrypt
|
||||
+@ stdcall BCryptEncrypt(ptr ptr long ptr ptr long ptr long ptr long) bcrypt.BCryptEncrypt
|
||||
|
@ -1,70 +0,0 @@
|
||||
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.
|
||||
|
||||
FIXME: Should we check for NULL pointers?
|
||||
---
|
||||
dlls/bcrypt/bcrypt.spec | 2 +-
|
||||
dlls/bcrypt/bcrypt_main.c | 18 ++++++++++++++++++
|
||||
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 962953e509b..9ecd21d767c 100644
|
||||
--- a/dlls/bcrypt/bcrypt.spec
|
||||
+++ b/dlls/bcrypt/bcrypt.spec
|
||||
@@ -11,7 +11,7 @@
|
||||
@ stdcall BCryptDestroyHash(ptr)
|
||||
@ stdcall BCryptDestroyKey(ptr)
|
||||
@ stub BCryptDestroySecret
|
||||
-@ stub BCryptDuplicateHash
|
||||
+@ stdcall BCryptDuplicateHash(ptr ptr ptr long long)
|
||||
@ stub BCryptDuplicateKey
|
||||
@ 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 4f09948096c..3eb0135b37c 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -672,6 +672,24 @@ end:
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
+NTSTATUS WINAPI BCryptDuplicateHash( BCRYPT_HASH_HANDLE handle, BCRYPT_HASH_HANDLE *handle_copy,
|
||||
+ UCHAR *object, ULONG object_count, ULONG flags )
|
||||
+{
|
||||
+ struct hash *hash_orig = handle;
|
||||
+ struct hash *hash_copy;
|
||||
+
|
||||
+ TRACE( "%p, %p, %p, %u, %u\n", handle, handle_copy, object, object_count, flags );
|
||||
+
|
||||
+ if (!hash_orig || hash_orig->hdr.magic != MAGIC_HASH) return STATUS_INVALID_HANDLE;
|
||||
+ if (!(hash_copy = HeapAlloc( GetProcessHeap(), 0, sizeof(*hash_copy) )))
|
||||
+ return STATUS_NO_MEMORY;
|
||||
+
|
||||
+ memcpy( hash_copy, hash_orig, sizeof(*hash_orig) );
|
||||
+
|
||||
+ *handle_copy = hash_copy;
|
||||
+ return STATUS_SUCCESS;
|
||||
+}
|
||||
+
|
||||
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.11.0
|
||||
|
@ -1,83 +0,0 @@
|
||||
From 873d431347aa25effc70e47566e562c122a5edc8 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 26 Dec 2016 04:23:31 +0100
|
||||
Subject: bcrypt: Handle NULL pointers in BCryptDuplicateHash and add tests.
|
||||
|
||||
---
|
||||
dlls/bcrypt/bcrypt_main.c | 1 +
|
||||
dlls/bcrypt/tests/bcrypt.c | 26 +++++++++++++++++++++++++-
|
||||
2 files changed, 26 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
|
||||
index a9006a4..d1516cc 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -681,6 +681,7 @@ NTSTATUS WINAPI BCryptDuplicateHash( BCRYPT_HASH_HANDLE handle, BCRYPT_HASH_HAND
|
||||
TRACE( "%p, %p, %p, %u, %u\n", handle, handle_copy, object, object_count, flags );
|
||||
|
||||
if (!hash_orig || hash_orig->hdr.magic != MAGIC_HASH) return STATUS_INVALID_HANDLE;
|
||||
+ if (!handle_copy) return STATUS_INVALID_PARAMETER;
|
||||
if (!(hash_copy = HeapAlloc( GetProcessHeap(), 0, sizeof(*hash_copy) )))
|
||||
return STATUS_NO_MEMORY;
|
||||
|
||||
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
|
||||
index 997b298..bfe3a7e 100644
|
||||
--- a/dlls/bcrypt/tests/bcrypt.c
|
||||
+++ b/dlls/bcrypt/tests/bcrypt.c
|
||||
@@ -33,6 +33,7 @@ static NTSTATUS (WINAPI *pBCryptCreateHash)(BCRYPT_ALG_HANDLE, BCRYPT_HASH_HANDL
|
||||
ULONG, ULONG);
|
||||
static NTSTATUS (WINAPI *pBCryptHash)(BCRYPT_ALG_HANDLE, UCHAR *, ULONG, UCHAR *, ULONG, UCHAR *, ULONG);
|
||||
static NTSTATUS (WINAPI *pBCryptHashData)(BCRYPT_HASH_HANDLE, PUCHAR, ULONG, ULONG);
|
||||
+static NTSTATUS (WINAPI *pBCryptDuplicateHash)(BCRYPT_HASH_HANDLE, BCRYPT_HASH_HANDLE *, UCHAR *, ULONG, ULONG);
|
||||
static NTSTATUS (WINAPI *pBCryptFinishHash)(BCRYPT_HASH_HANDLE, PUCHAR, ULONG, ULONG);
|
||||
static NTSTATUS (WINAPI *pBCryptDestroyHash)(BCRYPT_HASH_HANDLE);
|
||||
static NTSTATUS (WINAPI *pBCryptGenRandom)(BCRYPT_ALG_HANDLE, PUCHAR, ULONG, ULONG);
|
||||
@@ -173,7 +174,7 @@ static void test_sha1(void)
|
||||
static const char expected[] = "961fa64958818f767707072755d7018dcd278e94";
|
||||
static const char expected_hmac[] = "2472cf65d0e090618d769d3e46f0d9446cf212da";
|
||||
BCRYPT_ALG_HANDLE alg;
|
||||
- BCRYPT_HASH_HANDLE hash;
|
||||
+ BCRYPT_HASH_HANDLE hash, hash2;
|
||||
UCHAR buf[512], buf_hmac[1024], sha1[20], sha1_hmac[20];
|
||||
ULONG size, len;
|
||||
char str[41];
|
||||
@@ -260,6 +261,28 @@ static void test_sha1(void)
|
||||
test_hash_length(hash, 20);
|
||||
test_alg_name(hash, "SHA1");
|
||||
|
||||
+ ret = pBCryptDuplicateHash(NULL, &hash2, NULL, 0, 0);
|
||||
+ ok(ret == STATUS_INVALID_HANDLE, "got %08x\n", ret);
|
||||
+
|
||||
+ ret = pBCryptDuplicateHash(hash, NULL, NULL, 0, 0);
|
||||
+ ok(ret == STATUS_INVALID_PARAMETER, "got %08x\n", ret);
|
||||
+
|
||||
+ hash2 = (void *)0xdeadbeef;
|
||||
+ ret = pBCryptDuplicateHash(hash, &hash2, NULL, 0, 0);
|
||||
+ ok(ret == STATUS_SUCCESS || broken(ret == STATUS_INVALID_PARAMETER) /* < Win 7 */, "got %08x\n", ret);
|
||||
+
|
||||
+ if (ret == STATUS_SUCCESS)
|
||||
+ {
|
||||
+ memset(sha1_hmac, 0, sizeof(sha1_hmac));
|
||||
+ ret = pBCryptFinishHash(hash2, sha1_hmac, sizeof(sha1_hmac), 0);
|
||||
+ ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
|
||||
+ format_hash( sha1_hmac, sizeof(sha1_hmac), str );
|
||||
+ ok(!strcmp(str, expected_hmac), "got %s\n", str);
|
||||
+
|
||||
+ ret = pBCryptDestroyHash(hash2);
|
||||
+ ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
|
||||
+ }
|
||||
+
|
||||
memset(sha1_hmac, 0, sizeof(sha1_hmac));
|
||||
ret = pBCryptFinishHash(hash, sha1_hmac, sizeof(sha1_hmac), 0);
|
||||
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
|
||||
@@ -1179,6 +1202,7 @@ START_TEST(bcrypt)
|
||||
pBCryptCreateHash = (void *)GetProcAddress(module, "BCryptCreateHash");
|
||||
pBCryptHash = (void *)GetProcAddress(module, "BCryptHash");
|
||||
pBCryptHashData = (void *)GetProcAddress(module, "BCryptHashData");
|
||||
+ pBCryptDuplicateHash = (void *)GetProcAddress(module, "BCryptDuplicateHash");
|
||||
pBCryptFinishHash = (void *)GetProcAddress(module, "BCryptFinishHash");
|
||||
pBCryptDestroyHash = (void *)GetProcAddress(module, "BCryptDestroyHash");
|
||||
pBCryptGenRandom = (void *)GetProcAddress(module, "BCryptGenRandom");
|
||||
--
|
||||
2.9.0
|
||||
|
@ -1,17 +1,17 @@
|
||||
From 9f68ea60cf840c9366aefe1ab486e9d1ee192843 Mon Sep 17 00:00:00 2001
|
||||
From a93745453350f9eabcab0f49528c3f027a303c24 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 26 Dec 2016 06:18:01 +0100
|
||||
Subject: bcrypt: Pass object to get_{alg,hash}_property instead of alg_id.
|
||||
|
||||
---
|
||||
dlls/bcrypt/bcrypt_main.c | 32 ++++++++++++++++----------------
|
||||
1 file changed, 16 insertions(+), 16 deletions(-)
|
||||
dlls/bcrypt/bcrypt_main.c | 30 +++++++++++++++---------------
|
||||
1 file changed, 15 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
|
||||
index d1516cc..8a5161b 100644
|
||||
index d0a1b074b50..deab6f28bd9 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -450,16 +450,16 @@ static NTSTATUS generic_alg_property( enum alg_id id, const WCHAR *prop, UCHAR *
|
||||
@@ -440,15 +440,15 @@ static NTSTATUS generic_alg_property( enum alg_id id, const WCHAR *prop, UCHAR *
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
@ -19,7 +19,6 @@ index d1516cc..8a5161b 100644
|
||||
+static NTSTATUS get_alg_property( const struct algorithm *alg, const WCHAR *prop, UCHAR *buf, ULONG size, ULONG *ret_size )
|
||||
{
|
||||
NTSTATUS status;
|
||||
ULONG value;
|
||||
|
||||
- status = generic_alg_property( id, prop, buf, size, ret_size );
|
||||
+ status = generic_alg_property( alg->id, prop, buf, size, ret_size );
|
||||
@ -31,17 +30,8 @@ index d1516cc..8a5161b 100644
|
||||
{
|
||||
case ALG_ID_AES:
|
||||
if (!strcmpW( prop, BCRYPT_BLOCK_LENGTH ))
|
||||
@@ -540,7 +540,7 @@ static NTSTATUS get_alg_property( enum alg_id id, const WCHAR *prop, UCHAR *buf,
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
|
||||
default:
|
||||
- FIXME( "unsupported algorithm %u\n", id );
|
||||
+ FIXME( "unsupported algorithm %u\n", alg->id );
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
@@ -555,11 +555,11 @@ static NTSTATUS get_alg_property( enum alg_id id, const WCHAR *prop, UCHAR *buf,
|
||||
return STATUS_SUCCESS;
|
||||
@@ -484,11 +484,11 @@ static NTSTATUS get_alg_property( enum alg_id id, const WCHAR *prop, UCHAR *buf,
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
-static NTSTATUS get_hash_property( enum alg_id id, const WCHAR *prop, UCHAR *buf, ULONG size, ULONG *ret_size )
|
||||
@ -54,7 +44,7 @@ index d1516cc..8a5161b 100644
|
||||
if (status == STATUS_NOT_IMPLEMENTED)
|
||||
FIXME( "unsupported property %s\n", debugstr_w(prop) );
|
||||
return status;
|
||||
@@ -579,12 +579,12 @@ NTSTATUS WINAPI BCryptGetProperty( BCRYPT_HANDLE handle, LPCWSTR prop, UCHAR *bu
|
||||
@@ -508,12 +508,12 @@ NTSTATUS WINAPI BCryptGetProperty( BCRYPT_HANDLE handle, LPCWSTR prop, UCHAR *bu
|
||||
case MAGIC_ALG:
|
||||
{
|
||||
const struct algorithm *alg = (const struct algorithm *)object;
|
||||
@ -69,7 +59,7 @@ index d1516cc..8a5161b 100644
|
||||
}
|
||||
default:
|
||||
WARN( "unknown magic %08x\n", object->magic );
|
||||
@@ -783,34 +783,34 @@ struct key
|
||||
@@ -697,34 +697,34 @@ struct key
|
||||
ULONG secret_len;
|
||||
};
|
||||
|
||||
@ -110,7 +100,7 @@ index d1516cc..8a5161b 100644
|
||||
key->handle = 0; /* initialized on first use */
|
||||
key->secret = buffer;
|
||||
key->secret_len = secret_len;
|
||||
@@ -906,7 +906,7 @@ struct key
|
||||
@@ -820,7 +820,7 @@ struct key
|
||||
ULONG block_size;
|
||||
};
|
||||
|
||||
@ -119,7 +109,7 @@ index d1516cc..8a5161b 100644
|
||||
{
|
||||
ERR( "support for keys not available at build time\n" );
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
@@ -955,7 +955,7 @@ NTSTATUS WINAPI BCryptGenerateSymmetricKey( BCRYPT_ALG_HANDLE algorithm, BCRYPT_
|
||||
@@ -869,7 +869,7 @@ NTSTATUS WINAPI BCryptGenerateSymmetricKey( BCRYPT_ALG_HANDLE algorithm, BCRYPT_
|
||||
if (!(key = HeapAlloc( GetProcessHeap(), 0, sizeof(*key) ))) return STATUS_NO_MEMORY;
|
||||
key->hdr.magic = MAGIC_KEY;
|
||||
|
||||
@ -129,5 +119,5 @@ index d1516cc..8a5161b 100644
|
||||
HeapFree( GetProcessHeap(), 0, key );
|
||||
return status;
|
||||
--
|
||||
2.9.0
|
||||
2.11.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 03131f461a6650b1fa04aec9cbeaba225b42653d Mon Sep 17 00:00:00 2001
|
||||
From 2f57d906c55bdc99f476b6547f67d864e7210f16 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Mon, 26 Dec 2016 06:08:33 +0100
|
||||
Subject: bcrypt: Implement BCryptSetProperty for algorithms.
|
||||
@ -9,7 +9,7 @@ Subject: bcrypt: Implement BCryptSetProperty for algorithms.
|
||||
2 files changed, 67 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
|
||||
index eb89af3757c..2885c5101ed 100644
|
||||
index deab6f28bd9..595d36d7dbe 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -153,6 +153,12 @@ enum alg_id
|
||||
@ -25,7 +25,7 @@ index eb89af3757c..2885c5101ed 100644
|
||||
#define MAX_HASH_OUTPUT_BYTES 64
|
||||
#define MAX_HASH_BLOCK_BITS 1024
|
||||
|
||||
@@ -174,6 +180,7 @@ struct algorithm
|
||||
@@ -175,6 +181,7 @@ struct algorithm
|
||||
{
|
||||
struct object hdr;
|
||||
enum alg_id id;
|
||||
@ -33,7 +33,7 @@ index eb89af3757c..2885c5101ed 100644
|
||||
BOOL hmac;
|
||||
};
|
||||
|
||||
@@ -254,6 +261,7 @@ NTSTATUS WINAPI BCryptOpenAlgorithmProvider( BCRYPT_ALG_HANDLE *handle, LPCWSTR
|
||||
@@ -255,6 +262,7 @@ NTSTATUS WINAPI BCryptOpenAlgorithmProvider( BCRYPT_ALG_HANDLE *handle, LPCWSTR
|
||||
if (!(alg = HeapAlloc( GetProcessHeap(), 0, sizeof(*alg) ))) return STATUS_NO_MEMORY;
|
||||
alg->hdr.magic = MAGIC_ALG;
|
||||
alg->id = alg_id;
|
||||
@ -41,8 +41,8 @@ index eb89af3757c..2885c5101ed 100644
|
||||
alg->hmac = flags & BCRYPT_ALG_HANDLE_HMAC_FLAG;
|
||||
|
||||
*handle = alg;
|
||||
@@ -541,6 +549,40 @@ static NTSTATUS get_alg_property( const struct algorithm *alg, const WCHAR *prop
|
||||
return STATUS_SUCCESS;
|
||||
@@ -484,6 +492,40 @@ static NTSTATUS get_alg_property( const struct algorithm *alg, const WCHAR *prop
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
+static NTSTATUS set_alg_property( struct algorithm *alg, const WCHAR *prop, UCHAR *value, ULONG size, ULONG flags )
|
||||
@ -82,7 +82,7 @@ index eb89af3757c..2885c5101ed 100644
|
||||
static NTSTATUS get_hash_property( const struct hash *hash, const WCHAR *prop, UCHAR *buf, ULONG size, ULONG *ret_size )
|
||||
{
|
||||
NTSTATUS status;
|
||||
@@ -581,8 +623,28 @@ NTSTATUS WINAPI BCryptGetProperty( BCRYPT_HANDLE handle, LPCWSTR prop, UCHAR *bu
|
||||
@@ -524,8 +566,28 @@ NTSTATUS WINAPI BCryptGetProperty( BCRYPT_HANDLE handle, LPCWSTR prop, UCHAR *bu
|
||||
NTSTATUS WINAPI BCryptSetProperty( BCRYPT_HANDLE handle, const WCHAR *prop, UCHAR *value,
|
||||
ULONG size, ULONG flags )
|
||||
{
|
||||
@ -114,10 +114,10 @@ index eb89af3757c..2885c5101ed 100644
|
||||
|
||||
NTSTATUS WINAPI BCryptCreateHash( BCRYPT_ALG_HANDLE algorithm, BCRYPT_HASH_HANDLE *handle, UCHAR *object, ULONG objectlen,
|
||||
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
|
||||
index a363da16f55..58faf47ea96 100644
|
||||
index abf59c8404d..08a83aaf7a5 100644
|
||||
--- a/dlls/bcrypt/tests/bcrypt.c
|
||||
+++ b/dlls/bcrypt/tests/bcrypt.c
|
||||
@@ -875,7 +875,7 @@ static void test_BCryptGenerateSymmetricKey(void)
|
||||
@@ -776,7 +776,7 @@ static void test_BCryptGenerateSymmetricKey(void)
|
||||
|
||||
ret = pBCryptSetProperty(aes, BCRYPT_CHAINING_MODE, (UCHAR *)BCRYPT_CHAIN_MODE_CBC,
|
||||
sizeof(BCRYPT_CHAIN_MODE_CBC), 0);
|
||||
@ -126,7 +126,7 @@ index a363da16f55..58faf47ea96 100644
|
||||
|
||||
size = 0xdeadbeef;
|
||||
ret = pBCryptEncrypt(key, NULL, 0, NULL, NULL, 0, NULL, 0, &size, 0);
|
||||
@@ -1064,7 +1064,7 @@ static void test_BCryptEncrypt(void)
|
||||
@@ -965,7 +965,7 @@ static void test_BCryptEncrypt(void)
|
||||
todo_wine ok(ret == STATUS_NOT_SUPPORTED, "got %08x\n", ret);
|
||||
|
||||
ret = BCryptSetProperty(aes, BCRYPT_CHAINING_MODE, (UCHAR*)BCRYPT_CHAIN_MODE_GCM, sizeof(BCRYPT_CHAIN_MODE_GCM), 0);
|
||||
@ -135,7 +135,7 @@ index a363da16f55..58faf47ea96 100644
|
||||
|
||||
size = 0;
|
||||
ret = BCryptGetProperty(aes, BCRYPT_AUTH_TAG_LENGTH, NULL, 0, &size, 0);
|
||||
@@ -1292,7 +1292,7 @@ static void test_BCryptDecrypt(void)
|
||||
@@ -1193,7 +1193,7 @@ static void test_BCryptDecrypt(void)
|
||||
******************/
|
||||
|
||||
ret = BCryptSetProperty(aes, BCRYPT_CHAINING_MODE, (UCHAR*)BCRYPT_CHAIN_MODE_GCM, sizeof(BCRYPT_CHAIN_MODE_GCM), 0);
|
||||
|
@ -1,4 +1,4 @@
|
||||
From f7749755c11e54d1e75cd05b6656d2c474ade8ae Mon Sep 17 00:00:00 2001
|
||||
From 6de382845ffbb12d514a0ece9483a72b34df852e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Mon, 26 Dec 2016 06:46:11 +0100
|
||||
Subject: bcrypt: Implement BCryptGetProperty for BCRYPT_CHAINING_MODE.
|
||||
@ -9,10 +9,10 @@ Subject: bcrypt: Implement BCryptGetProperty for BCRYPT_CHAINING_MODE.
|
||||
2 files changed, 11 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
|
||||
index 4757878..24dee8b 100644
|
||||
index 595d36d7dbe..3ab80a1a31a 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -482,17 +482,18 @@ static NTSTATUS get_alg_property( const struct algorithm *alg, const WCHAR *prop
|
||||
@@ -470,17 +470,18 @@ static NTSTATUS get_alg_property( const struct algorithm *alg, const WCHAR *prop
|
||||
}
|
||||
if (!strcmpW( prop, BCRYPT_CHAINING_MODE ))
|
||||
{
|
||||
@ -38,13 +38,13 @@ index 4757878..24dee8b 100644
|
||||
+ memcpy( buf, mode, (strlenW(mode) + 1) * sizeof(WCHAR) );
|
||||
+ return STATUS_SUCCESS;
|
||||
}
|
||||
FIXME( "unsupported aes algorithm property %s\n", debugstr_w(prop) );
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
break;
|
||||
|
||||
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
|
||||
index d850738..bbf18c4 100644
|
||||
index 08a83aaf7a5..1a5523726dd 100644
|
||||
--- a/dlls/bcrypt/tests/bcrypt.c
|
||||
+++ b/dlls/bcrypt/tests/bcrypt.c
|
||||
@@ -842,7 +842,7 @@ static void test_aes(void)
|
||||
@@ -729,7 +729,7 @@ static void test_aes(void)
|
||||
|
||||
size = 0;
|
||||
ret = pBCryptGetProperty(alg, BCRYPT_CHAINING_MODE, mode, sizeof(mode) - 1, &size, 0);
|
||||
@ -54,5 +54,5 @@ index d850738..bbf18c4 100644
|
||||
|
||||
size = 0;
|
||||
--
|
||||
2.9.0
|
||||
2.11.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 017f5d467e537e5159f9c14f703df97661a1453e Mon Sep 17 00:00:00 2001
|
||||
From 5f7f79f4ae52f87eeaaa04617a7cd9289dd655b2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Mon, 26 Dec 2016 06:50:28 +0100
|
||||
Subject: bcrypt: Implement BCryptGetProperty for BCRYPT_AUTH_TAG_LENGTH.
|
||||
@ -9,10 +9,10 @@ Subject: bcrypt: Implement BCryptGetProperty for BCRYPT_AUTH_TAG_LENGTH.
|
||||
2 files changed, 22 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
|
||||
index 24dee8b..dc5c798 100644
|
||||
index 3ab80a1a31a..0a990158361 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -495,6 +495,20 @@ static NTSTATUS get_alg_property( const struct algorithm *alg, const WCHAR *prop
|
||||
@@ -483,6 +483,20 @@ static NTSTATUS get_alg_property( const struct algorithm *alg, const WCHAR *prop
|
||||
memcpy( buf, mode, (strlenW(mode) + 1) * sizeof(WCHAR) );
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
@ -30,14 +30,14 @@ index 24dee8b..dc5c798 100644
|
||||
+ }
|
||||
+ return STATUS_SUCCESS;
|
||||
+ }
|
||||
FIXME( "unsupported aes algorithm property %s\n", debugstr_w(prop) );
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
break;
|
||||
|
||||
default:
|
||||
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
|
||||
index bbf18c4..513d11f 100644
|
||||
index 1a5523726dd..50340566093 100644
|
||||
--- a/dlls/bcrypt/tests/bcrypt.c
|
||||
+++ b/dlls/bcrypt/tests/bcrypt.c
|
||||
@@ -1075,24 +1075,24 @@ static void test_BCryptEncrypt(void)
|
||||
@@ -962,24 +962,24 @@ static void test_BCryptEncrypt(void)
|
||||
|
||||
size = 0;
|
||||
ret = BCryptGetProperty(aes, BCRYPT_AUTH_TAG_LENGTH, NULL, 0, &size, 0);
|
||||
@ -71,5 +71,5 @@ index bbf18c4..513d11f 100644
|
||||
len = 0xdeadbeef;
|
||||
size = sizeof(len);
|
||||
--
|
||||
2.9.0
|
||||
2.11.0
|
||||
|
||||
|
@ -1,3 +1,2 @@
|
||||
Fixes: [41951] Implement bcrypt.BCryptDuplicateHash
|
||||
Fixes: [40418] Implement BCrypt AES provider
|
||||
Fixes: [42553] Implement BCrypt ECB chaining mode
|
||||
|
@ -1,4 +1,4 @@
|
||||
From dd12a2be3d035d72a3e08573849cdb457b9ec1e7 Mon Sep 17 00:00:00 2001
|
||||
From c2d4f3fc4de77decbec1a31b07507e26baaf1c16 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 4 Mar 2016 22:22:42 +0100
|
||||
Subject: ddraw: Set ddsOldCaps correctly in ddraw7_GetCaps.
|
||||
@ -109,10 +109,10 @@ index 0c2c00f2af7..c26e2cd9b12 100644
|
||||
+ test_caps();
|
||||
}
|
||||
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
|
||||
index 4c15e0b3a09..af3c145122f 100644
|
||||
index dfdf4ce1932..52cc3c84447 100644
|
||||
--- a/dlls/ddraw/tests/ddraw4.c
|
||||
+++ b/dlls/ddraw/tests/ddraw4.c
|
||||
@@ -13386,6 +13386,31 @@ done:
|
||||
@@ -13450,6 +13450,31 @@ static void test_vb_refcount(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
@ -144,17 +144,17 @@ index 4c15e0b3a09..af3c145122f 100644
|
||||
START_TEST(ddraw4)
|
||||
{
|
||||
IDirectDraw4 *ddraw;
|
||||
@@ -13490,4 +13515,5 @@ START_TEST(ddraw4)
|
||||
test_surface_desc_size();
|
||||
@@ -13555,4 +13580,5 @@ START_TEST(ddraw4)
|
||||
test_get_surface_from_dc();
|
||||
test_ck_operation();
|
||||
test_vb_refcount();
|
||||
+ test_caps();
|
||||
}
|
||||
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c
|
||||
index 4828aa46d6f..d5244625d96 100644
|
||||
index 1378673b480..65d4bfca464 100644
|
||||
--- a/dlls/ddraw/tests/ddraw7.c
|
||||
+++ b/dlls/ddraw/tests/ddraw7.c
|
||||
@@ -13077,6 +13077,31 @@ done:
|
||||
@@ -13145,6 +13145,31 @@ static void test_vb_refcount(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
@ -186,10 +186,10 @@ index 4828aa46d6f..d5244625d96 100644
|
||||
START_TEST(ddraw7)
|
||||
{
|
||||
HMODULE module = GetModuleHandleA("ddraw.dll");
|
||||
@@ -13191,4 +13216,5 @@ START_TEST(ddraw7)
|
||||
test_surface_desc_size();
|
||||
@@ -13260,4 +13285,5 @@ START_TEST(ddraw7)
|
||||
test_get_surface_from_dc();
|
||||
test_ck_operation();
|
||||
test_vb_refcount();
|
||||
+ test_caps();
|
||||
}
|
||||
--
|
||||
|
@ -1,58 +0,0 @@
|
||||
From 3b325b1efd31f5162d119b7f7cef2edc06f3d627 Mon Sep 17 00:00:00 2001
|
||||
From: Austin English <austinenglish@gmail.com>
|
||||
Date: Wed, 24 Dec 2014 15:35:23 -0600
|
||||
Subject: ntoskrnl.exe: add KeWaitForMultipleObjects stub
|
||||
|
||||
---
|
||||
dlls/ntoskrnl.exe/ntoskrnl.c | 14 ++++++++++++++
|
||||
dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +-
|
||||
2 files changed, 15 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
|
||||
index 7c35d14..7ffae6e 100644
|
||||
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
|
||||
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
#include "ntstatus.h"
|
||||
#define WIN32_NO_STATUS
|
||||
+#include "ntdef.h"
|
||||
#include "windef.h"
|
||||
#include "winsvc.h"
|
||||
#include "winternl.h"
|
||||
@@ -1918,6 +1919,19 @@ NTSTATUS WINAPI KeWaitForSingleObject(PVOID Object,
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
+ * KeWaitForMultipleObjects (NTOSKRNL.EXE.@)
|
||||
+ */
|
||||
+NTSTATUS WINAPI KeWaitForMultipleObjects(ULONG Count, PVOID Object[], WAIT_TYPE WaitType,
|
||||
+ KWAIT_REASON WaitReason, KPROCESSOR_MODE WaitMode,
|
||||
+ BOOLEAN Alertable, PLARGE_INTEGER Timeout,
|
||||
+ PKWAIT_BLOCK WaitBlockArray)
|
||||
+{
|
||||
+ FIXME( "stub: %u, %p, %d, %d, %d, %d, %p, %p\n", Count, Object, WaitType, WaitReason, WaitMode,
|
||||
+ Alertable, Timeout, WaitBlockArray );
|
||||
+ return STATUS_NOT_IMPLEMENTED;
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
* IoRegisterFileSystem (NTOSKRNL.EXE.@)
|
||||
*/
|
||||
VOID WINAPI IoRegisterFileSystem(PDEVICE_OBJECT DeviceObject)
|
||||
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
|
||||
index 119d406..059f49c 100644
|
||||
--- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
|
||||
+++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
|
||||
@@ -627,7 +627,7 @@
|
||||
@ stub KeUpdateRunTime
|
||||
@ stub KeUpdateSystemTime
|
||||
@ stub KeUserModeCallback
|
||||
-@ stub KeWaitForMultipleObjects
|
||||
+@ stdcall KeWaitForMultipleObjects(long ptr long long long long ptr ptr)
|
||||
@ stdcall KeWaitForMutexObject(ptr long long long ptr)
|
||||
@ stdcall KeWaitForSingleObject(ptr long long long ptr)
|
||||
@ stub KiBugCheckData
|
||||
--
|
||||
2.9.0
|
||||
|
@ -52,7 +52,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "be0e05604a5560e26757d161708c2c3dae717834"
|
||||
echo "4b1445940d47870895b7fa87b7d69d12abe701ef"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -2858,7 +2858,6 @@ fi
|
||||
# Patchset bcrypt-Improvements
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#41951] Implement bcrypt.BCryptDuplicateHash
|
||||
# | * [#40418] Implement BCrypt AES provider
|
||||
# | * [#42553] Implement BCrypt ECB chaining mode
|
||||
# |
|
||||
@ -2868,11 +2867,9 @@ fi
|
||||
# |
|
||||
if test "$enable_bcrypt_Improvements" -eq 1; then
|
||||
patch_apply bcrypt-Improvements/0001-bcrypt-Add-AES-provider.patch
|
||||
patch_apply bcrypt-Improvements/0005-bcrypt-Implement-BCryptDuplicateHash.patch
|
||||
patch_apply bcrypt-Improvements/0006-bcrypt-Fix-handling-of-padding-when-input-size-equal.patch
|
||||
patch_apply bcrypt-Improvements/0007-bcrypt-Properly-handle-padding-in-AES-decryption.patch
|
||||
patch_apply bcrypt-Improvements/0008-bcrypt-Fix-use-after-free-in-key_init.patch
|
||||
patch_apply bcrypt-Improvements/0009-bcrypt-Handle-NULL-pointers-in-BCryptDuplicateHash-a.patch
|
||||
patch_apply bcrypt-Improvements/0010-bcrypt-tests-Add-test-for-bugs-in-BCryptGetProperty.patch
|
||||
patch_apply bcrypt-Improvements/0011-bcrypt-tests-Add-tests-for-AES-GCM-mode.patch
|
||||
patch_apply bcrypt-Improvements/0012-bcrypt-Pass-object-to-get_-alg-hash-_property-instea.patch
|
||||
@ -2892,11 +2889,9 @@ if test "$enable_bcrypt_Improvements" -eq 1; then
|
||||
patch_apply bcrypt-Improvements/0026-bcrypt-Implement-support-for-ECB-chain-mode.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Hans Leidekker", "bcrypt: Add AES provider.", 1 },';
|
||||
printf '%s\n' '+ { "Michael Müller", "bcrypt: Implement BCryptDuplicateHash.", 1 },';
|
||||
printf '%s\n' '+ { "Michael Müller", "bcrypt: Fix handling of padding when input size equals block size for AES.", 1 },';
|
||||
printf '%s\n' '+ { "Michael Müller", "bcrypt: Properly handle padding in AES decryption.", 1 },';
|
||||
printf '%s\n' '+ { "Michael Müller", "bcrypt: Fix use-after-free in key_init.", 1 },';
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "bcrypt: Handle NULL pointers in BCryptDuplicateHash and add tests.", 1 },';
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "bcrypt/tests: Add test for bugs in BCryptGetProperty.", 1 },';
|
||||
printf '%s\n' '+ { "Michael Müller", "bcrypt/tests: Add tests for AES GCM mode.", 1 },';
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "bcrypt: Pass object to get_{alg,hash}_property instead of alg_id.", 1 },';
|
||||
@ -5985,7 +5980,6 @@ fi
|
||||
# | * dlls/ntoskrnl.exe/ntoskrnl.c, dlls/ntoskrnl.exe/ntoskrnl.exe.spec, include/ddk/wdm.h
|
||||
# |
|
||||
if test "$enable_ntoskrnl_Stubs" -eq 1; then
|
||||
patch_apply ntoskrnl-Stubs/0001-ntoskrnl.exe-add-KeWaitForMultipleObjects-stub.patch
|
||||
patch_apply ntoskrnl-Stubs/0003-ntoskrnl.exe-Add-stubs-for-ExAcquireFastMutexUnsafe-.patch
|
||||
patch_apply ntoskrnl-Stubs/0004-ntoskrnl.exe-Add-stubs-for-ObReferenceObjectByPointe.patch
|
||||
patch_apply ntoskrnl-Stubs/0005-ntoskrnl.exe-Improve-KeReleaseMutex-stub.patch
|
||||
@ -5996,7 +5990,6 @@ if test "$enable_ntoskrnl_Stubs" -eq 1; then
|
||||
patch_apply ntoskrnl-Stubs/0010-ntoskrnl.exe-Implement-KeInitializeMutex.patch
|
||||
patch_apply ntoskrnl-Stubs/0011-ntoskrnl.exe-Add-IoGetDeviceAttachmentBaseRef-stub.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Austin English", "ntoskrnl.exe: Add KeWaitForMultipleObjects stub.", 1 },';
|
||||
printf '%s\n' '+ { "Alexander Morozov", "ntoskrnl.exe: Add stubs for ExAcquireFastMutexUnsafe and ExReleaseFastMutexUnsafe.", 1 },';
|
||||
printf '%s\n' '+ { "Alexander Morozov", "ntoskrnl.exe: Add stub for ObReferenceObjectByPointer.", 1 },';
|
||||
printf '%s\n' '+ { "Alexander Morozov", "ntoskrnl.exe: Improve KeReleaseMutex stub.", 1 },';
|
||||
|
@ -3707,7 +3707,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
};
|
||||
|
||||
extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN;
|
||||
@@ -1564,6 +1567,10 @@ struct wined3d_query
|
||||
@@ -1573,6 +1576,10 @@ struct wined3d_query
|
||||
const void *data;
|
||||
DWORD data_size;
|
||||
const struct wined3d_query_ops *query_ops;
|
||||
@ -3718,7 +3718,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
};
|
||||
|
||||
union wined3d_gl_query_object
|
||||
@@ -1605,6 +1612,9 @@ struct wined3d_occlusion_query
|
||||
@@ -1614,6 +1621,9 @@ struct wined3d_occlusion_query
|
||||
GLuint id;
|
||||
struct wined3d_context *context;
|
||||
UINT64 samples;
|
||||
@ -3728,7 +3728,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
};
|
||||
|
||||
struct wined3d_timestamp_query
|
||||
@@ -2591,6 +2601,16 @@ struct wined3d_state
|
||||
@@ -2600,6 +2610,16 @@ struct wined3d_state
|
||||
struct wined3d_rasterizer_state *rasterizer_state;
|
||||
};
|
||||
|
||||
@ -3745,7 +3745,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
#define WINED3D_UNMAPPED_STAGE ~0u
|
||||
|
||||
/* Multithreaded flag. Removed from the public header to signal that
|
||||
@@ -2703,6 +2723,14 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
@@ -2712,6 +2732,14 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
|
||||
@ -3760,7 +3760,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
|
||||
{
|
||||
@@ -2778,11 +2806,13 @@ static inline void wined3d_resource_release(struct wined3d_resource *resource)
|
||||
@@ -2787,11 +2815,13 @@ static inline void wined3d_resource_release(struct wined3d_resource *resource)
|
||||
InterlockedDecrement(&resource->access_count);
|
||||
}
|
||||
|
||||
@ -3774,7 +3774,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void resource_cleanup(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *device,
|
||||
enum wined3d_resource_type type, const struct wined3d_format *format,
|
||||
@@ -2893,7 +2923,11 @@ struct wined3d_texture
|
||||
@@ -2902,7 +2932,11 @@ struct wined3d_texture
|
||||
|
||||
unsigned int map_count;
|
||||
DWORD locations;
|
||||
@ -3786,7 +3786,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
} sub_resources[1];
|
||||
};
|
||||
|
||||
@@ -2946,6 +2980,9 @@ void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture,
|
||||
@@ -2955,6 +2989,9 @@ void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
HRESULT wined3d_texture_check_box_dimensions(const struct wined3d_texture *texture,
|
||||
unsigned int level, const struct wined3d_box *box) DECLSPEC_HIDDEN;
|
||||
@ -3796,7 +3796,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
GLenum wined3d_texture_get_gl_buffer(const struct wined3d_texture *texture) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int sub_resource_idx,
|
||||
struct wined3d_bo_address *data, DWORD locations) DECLSPEC_HIDDEN;
|
||||
@@ -2961,6 +2998,10 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
|
||||
@@ -2970,6 +3007,10 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
|
||||
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_prepare_texture(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
@ -3807,7 +3807,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void wined3d_texture_set_map_binding(struct wined3d_texture *texture, DWORD map_binding) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_set_swapchain(struct wined3d_texture *texture,
|
||||
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
|
||||
@@ -3195,6 +3236,7 @@ enum wined3d_push_constants
|
||||
@@ -3204,6 +3245,7 @@ enum wined3d_push_constants
|
||||
WINED3D_PUSH_CONSTANTS_PS_B,
|
||||
};
|
||||
|
||||
@ -3815,7 +3815,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
struct wined3d_cs_ops
|
||||
{
|
||||
void *(*require_space)(struct wined3d_cs *cs, size_t size);
|
||||
@@ -3202,6 +3244,33 @@ struct wined3d_cs_ops
|
||||
@@ -3211,6 +3253,33 @@ struct wined3d_cs_ops
|
||||
void (*push_constants)(struct wined3d_cs *cs, enum wined3d_push_constants p,
|
||||
unsigned int start_idx, unsigned int count, const void *constants);
|
||||
};
|
||||
@ -3849,7 +3849,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
struct wined3d_cs
|
||||
{
|
||||
@@ -3212,8 +3281,31 @@ struct wined3d_cs
|
||||
@@ -3221,8 +3290,31 @@ struct wined3d_cs
|
||||
|
||||
size_t data_size, start, end;
|
||||
void *data;
|
||||
@ -3881,7 +3881,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_destroy(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_destroy_object(struct wined3d_cs *cs,
|
||||
@@ -3224,15 +3316,34 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
@@ -3233,15 +3325,34 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
|
||||
const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
|
||||
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN;
|
||||
@ -3916,7 +3916,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx,
|
||||
const struct wined3d_vec4 *plane) DECLSPEC_HIDDEN;
|
||||
@@ -3280,10 +3391,20 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
@@ -3289,10 +3400,20 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
|
||||
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
|
||||
@ -3937,7 +3937,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void wined3d_cs_init_object(struct wined3d_cs *cs,
|
||||
void (*callback)(void *object), void *object) DECLSPEC_HIDDEN;
|
||||
HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
@@ -3291,12 +3412,14 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
@@ -3300,12 +3421,14 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resource,
|
||||
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user