Rebase against 65989f2ace1b06617638e31cb7ba56deb38fe690

This commit is contained in:
Alistair Leslie-Hughes 2018-02-16 08:40:30 +11:00
parent 6581a6f2ea
commit 7622ec9450
44 changed files with 443 additions and 744 deletions

View File

@ -1,14 +1,14 @@
From cd3c63b259a711abf4e6e06f975e47f82b5b3e1b Mon Sep 17 00:00:00 2001
From 3dd0480317fe0ed3951daf1cf5757204d11a1ae5 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 22 Mar 2016 21:55:12 +0100
Subject: d3d9: Avoid implicit cast of interface pointer.
Subject: [PATCH] d3d9: Avoid implicit cast of interface pointer.
---
dlls/d3d9/texture.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/d3d9/texture.c b/dlls/d3d9/texture.c
index 07bd83e..4e50093 100644
index d3662f8..ebc3413 100644
--- a/dlls/d3d9/texture.c
+++ b/dlls/d3d9/texture.c
@@ -25,17 +25,17 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
@ -31,7 +31,7 @@ index 07bd83e..4e50093 100644
+ return CONTAINING_RECORD((IDirect3DBaseTexture9 *)iface, struct d3d9_texture, IDirect3DBaseTexture9_iface);
}
static HRESULT WINAPI d3d9_texture_2d_QueryInterface(IDirect3DTexture9 *iface, REFIID riid, void **out)
static void STDMETHODCALLTYPE srv_wined3d_object_destroyed(void *parent)
--
2.7.1
1.9.1

View File

@ -1,17 +1,17 @@
From 83b15bed14a0999bacd2a5959297bff842a125e0 Mon Sep 17 00:00:00 2001
From 493f7a848054d2d11d4f9c915a46055ba6f2bf24 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 26 Dec 2016 04:38:15 +0100
Subject: bcrypt/tests: Add test for bugs in BCryptGetProperty.
Subject: [PATCH] bcrypt/tests: Add test for bugs in BCryptGetProperty.
---
dlls/bcrypt/tests/bcrypt.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index bfe3a7e..23e150e 100644
index 6fa04b0..8fd6c6a 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -841,6 +841,12 @@ static void test_aes(void)
@@ -452,6 +452,12 @@ static void test_aes(void)
ok(size == 64, "got %u\n", size);
size = 0;
@ -25,5 +25,5 @@ index bfe3a7e..23e150e 100644
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
ok(!lstrcmpW((const WCHAR *)mode, BCRYPT_CHAIN_MODE_CBC), "got %s\n", mode);
--
2.9.0
1.9.1

View File

@ -1,4 +1,4 @@
From e79bfa6ad892b6dabc686e4109b9c01cb0a9d816 Mon Sep 17 00:00:00 2001
From 2938bda81ec62e4cfee5b1af3ed4d218ce673eff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 26 Dec 2016 05:37:02 +0100
Subject: [PATCH] bcrypt/tests: Add tests for AES GCM mode.

View File

@ -1,15 +1,15 @@
From 499bccf292d3279bdbc4170de49e0cc596e5b43e Mon Sep 17 00:00:00 2001
From 882e1172fa4b2ad6f3746d8d3f1fa40eaa2cd40c Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 26 Dec 2016 06:18:01 +0100
Subject: [PATCH] bcrypt: Pass object to get_{alg,hash}_property instead of
alg_id.
---
dlls/bcrypt/bcrypt_main.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 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 c064b63..7f37560 100644
index c064b63..b23e1ea 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -509,15 +509,15 @@ static NTSTATUS generic_alg_property( enum alg_id id, const WCHAR *prop, UCHAR *
@ -69,7 +69,14 @@ index c064b63..7f37560 100644
{
ULONG ret = 0, size = sizeof(ret);
get_alg_property( alg, BCRYPT_BLOCK_LENGTH, (UCHAR *)&ret, sizeof(ret), &size );
@@ -793,21 +793,21 @@ static NTSTATUS key_init( struct key *key, enum alg_id id, const UCHAR *secret,
@@ -787,27 +787,27 @@ struct key
ULONG secret_len;
};
-static NTSTATUS key_init( struct key *key, enum alg_id id, const UCHAR *secret, ULONG secret_len )
+static NTSTATUS key_init( struct key *key, struct algorithm *alg, const UCHAR *secret, ULONG secret_len )
{
UCHAR *buffer;
if (!libgnutls_handle) return STATUS_INTERNAL_ERROR;

View File

@ -1,7 +1,7 @@
From b1132f420bf61b9a6f44ee62ea8f90a239010541 Mon Sep 17 00:00:00 2001
From b97cc4c8df55e42e30d7d241fe7db1f49f7e2bc5 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.
Subject: [PATCH] bcrypt: Implement BCryptSetProperty for algorithms.
---
dlls/bcrypt/bcrypt_main.c | 66 ++++++++++++++++++++++++++++++++++++++++++++--
@ -9,10 +9,10 @@ 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 4869206ab49..07c3f8b8d74 100644
index b23e1ea..46e188f 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -153,6 +153,12 @@ enum alg_id
@@ -191,6 +191,12 @@ enum alg_id
ALG_ID_SHA512
};
@ -25,7 +25,7 @@ index 4869206ab49..07c3f8b8d74 100644
#define MAX_HASH_OUTPUT_BYTES 64
#define MAX_HASH_BLOCK_BITS 1024
@@ -175,6 +181,7 @@ struct algorithm
@@ -215,6 +221,7 @@ struct algorithm
{
struct object hdr;
enum alg_id id;
@ -33,7 +33,7 @@ index 4869206ab49..07c3f8b8d74 100644
BOOL hmac;
};
@@ -255,6 +262,7 @@ NTSTATUS WINAPI BCryptOpenAlgorithmProvider( BCRYPT_ALG_HANDLE *handle, LPCWSTR
@@ -297,6 +304,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,7 +41,7 @@ index 4869206ab49..07c3f8b8d74 100644
alg->hmac = flags & BCRYPT_ALG_HANDLE_HMAC_FLAG;
*handle = alg;
@@ -484,6 +492,40 @@ static NTSTATUS get_alg_property( const struct algorithm *alg, const WCHAR *prop
@@ -566,6 +574,40 @@ static NTSTATUS get_alg_property( const struct algorithm *alg, const WCHAR *prop
return STATUS_NOT_IMPLEMENTED;
}
@ -82,7 +82,7 @@ index 4869206ab49..07c3f8b8d74 100644
static NTSTATUS get_hash_property( const struct hash *hash, const WCHAR *prop, UCHAR *buf, ULONG size, ULONG *ret_size )
{
NTSTATUS status;
@@ -523,8 +565,28 @@ NTSTATUS WINAPI BCryptGetProperty( BCRYPT_HANDLE handle, LPCWSTR prop, UCHAR *bu
@@ -605,8 +647,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 4869206ab49..07c3f8b8d74 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 abf59c8404d..08a83aaf7a5 100644
index 517baf2..4522505 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -776,7 +776,7 @@ static void test_BCryptGenerateSymmetricKey(void)
@@ -509,7 +509,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 abf59c8404d..08a83aaf7a5 100644
size = 0xdeadbeef;
ret = pBCryptEncrypt(key, NULL, 0, NULL, NULL, 0, NULL, 0, &size, 0);
@@ -965,7 +965,7 @@ static void test_BCryptEncrypt(void)
@@ -698,7 +698,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 abf59c8404d..08a83aaf7a5 100644
size = 0;
ret = BCryptGetProperty(aes, BCRYPT_AUTH_TAG_LENGTH, NULL, 0, &size, 0);
@@ -1193,7 +1193,7 @@ static void test_BCryptDecrypt(void)
@@ -936,7 +936,7 @@ static void test_BCryptDecrypt(void)
******************/
ret = BCryptSetProperty(aes, BCRYPT_CHAINING_MODE, (UCHAR*)BCRYPT_CHAIN_MODE_GCM, sizeof(BCRYPT_CHAIN_MODE_GCM), 0);
@ -145,5 +145,5 @@ index abf59c8404d..08a83aaf7a5 100644
buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
ret = pBCryptGenerateSymmetricKey(aes, &key, buf, len, secret, sizeof(secret), 0);
--
2.13.1
1.9.1

View File

@ -1,7 +1,7 @@
From 46ceeaa21f5c7c9201233313826ac64a569c558a Mon Sep 17 00:00:00 2001
From 66a2dae258c8a257f904e4235ce1e77451e40cc5 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.
Subject: [PATCH] bcrypt: Implement BCryptGetProperty for BCRYPT_CHAINING_MODE.
---
dlls/bcrypt/bcrypt_main.c | 19 ++++++++++---------
@ -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 93e805dcbfe..4b0b297ed85 100644
index 46e188f..714cb91 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -470,17 +470,18 @@ static NTSTATUS get_alg_property( const struct algorithm *alg, const WCHAR *prop
@@ -539,17 +539,18 @@ static NTSTATUS get_alg_property( const struct algorithm *alg, const WCHAR *prop
}
if (!strcmpW( prop, BCRYPT_CHAINING_MODE ))
{
@ -41,10 +41,10 @@ index 93e805dcbfe..4b0b297ed85 100644
if (!strcmpW( prop, BCRYPT_KEY_LENGTHS ))
{
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index 7f23c687148..6653f6632a4 100644
index 4522505..d1633a8 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -730,7 +730,7 @@ static void test_aes(void)
@@ -453,7 +453,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 7f23c687148..6653f6632a4 100644
size = 0;
--
2.13.1
1.9.1

View File

@ -1,7 +1,8 @@
From 9b09bc711cc5814452b046985720d925587f329b Mon Sep 17 00:00:00 2001
From c5e9448e8fa27c7ff1ce7826f8ac15c8d825ac9e 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.
Subject: [PATCH] bcrypt: Implement BCryptGetProperty for
BCRYPT_AUTH_TAG_LENGTH.
---
dlls/bcrypt/bcrypt_main.c | 14 ++++++++++++++
@ -9,10 +10,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 4b0b297ed85..39c898d5f6e 100644
index 714cb91..dc5a4f2 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -496,6 +496,20 @@ static NTSTATUS get_alg_property( const struct algorithm *alg, const WCHAR *prop
@@ -565,6 +565,20 @@ static NTSTATUS get_alg_property( const struct algorithm *alg, const WCHAR *prop
}
return STATUS_SUCCESS;
}
@ -34,10 +35,10 @@ index 4b0b297ed85..39c898d5f6e 100644
default:
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index 6653f6632a4..d8e9ddb1272 100644
index d1633a8..14f9eaa 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -972,24 +972,24 @@ static void test_BCryptEncrypt(void)
@@ -695,24 +695,24 @@ static void test_BCryptEncrypt(void)
size = 0;
ret = BCryptGetProperty(aes, BCRYPT_AUTH_TAG_LENGTH, NULL, 0, &size, 0);
@ -71,5 +72,5 @@ index 6653f6632a4..d8e9ddb1272 100644
len = 0xdeadbeef;
size = sizeof(len);
--
2.13.1
1.9.1

View File

@ -1,7 +1,7 @@
From d48dfa8d9c59c26ed7d5eabfb73478e0ab9e7ee6 Mon Sep 17 00:00:00 2001
From bd66e10e4141e514145c1be5444ae200919d7505 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 26 Dec 2016 07:21:27 +0100
Subject: bcrypt: Fix string comparison in set_alg_property.
Subject: [PATCH] bcrypt: Fix string comparison in set_alg_property.
---
dlls/bcrypt/bcrypt_main.c | 6 ++----
@ -9,10 +9,10 @@ Subject: bcrypt: Fix string comparison in set_alg_property.
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 39c898d5f6e..28fa35dc9d5 100644
index dc5a4f2..725c285 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -527,14 +527,12 @@ static NTSTATUS set_alg_property( struct algorithm *alg, const WCHAR *prop, UCHA
@@ -596,14 +596,12 @@ static NTSTATUS set_alg_property( struct algorithm *alg, const WCHAR *prop, UCHA
case ALG_ID_AES:
if (!strcmpW( prop, BCRYPT_CHAINING_MODE ))
{
@ -30,10 +30,10 @@ index 39c898d5f6e..28fa35dc9d5 100644
alg->mode = MODE_ID_GCM;
return STATUS_SUCCESS;
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index d8e9ddb1272..8dc932434e6 100644
index 14f9eaa..c4b411d 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -749,6 +749,17 @@ static void test_aes(void)
@@ -472,6 +472,17 @@ static void test_aes(void)
ok(key_lengths.dwMaxLength == 256, "Expected 256, got %d\n", key_lengths.dwMaxLength);
ok(key_lengths.dwIncrement == 64, "Expected 64, got %d\n", key_lengths.dwIncrement);
@ -52,5 +52,5 @@ index d8e9ddb1272..8dc932434e6 100644
ret = pBCryptCloseAlgorithmProvider(alg, 0);
--
2.13.1
1.9.1

View File

@ -1,7 +1,7 @@
From ad15e50c53901317847236410be7b1d005e1a502 Mon Sep 17 00:00:00 2001
From 143cf9efb5def04f854657b90d5c26847d6f72f9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 26 Dec 2016 07:46:57 +0100
Subject: bcrypt: Implement BCryptEncrypt for AES GCM mode.
Subject: [PATCH] bcrypt: Implement BCryptEncrypt for AES GCM mode.
---
dlls/bcrypt/bcrypt_main.c | 50 ++++++++++++++++++++++++++++++++++++++--------
@ -9,7 +9,7 @@ Subject: bcrypt: Implement BCryptEncrypt for AES GCM mode.
2 files changed, 51 insertions(+), 17 deletions(-)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 774f29a..a143580 100644
index 725c285..b7e1957 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -62,6 +62,12 @@ MAKE_FUNCPTR(gnutls_global_set_log_level);
@ -25,7 +25,7 @@ index 774f29a..a143580 100644
static void gnutls_log( int level, const char *msg )
{
TRACE( "<%d> %s", level, msg );
@@ -852,6 +858,7 @@ struct key
@@ -856,6 +862,7 @@ struct key
{
struct object hdr;
enum alg_id alg_id;
@ -33,7 +33,7 @@ index 774f29a..a143580 100644
ULONG block_size;
gnutls_cipher_hd_t handle;
UCHAR *secret;
@@ -886,6 +893,7 @@ static NTSTATUS key_init( struct key *key, struct algorithm *alg, UCHAR *secret,
@@ -883,6 +890,7 @@ static NTSTATUS key_init( struct key *key, struct algorithm *alg, const UCHAR *s
memcpy( buffer, secret, secret_len );
key->alg_id = alg->id;
@ -41,7 +41,7 @@ index 774f29a..a143580 100644
key->handle = 0; /* initialized on first use */
key->secret = buffer;
key->secret_len = secret_len;
@@ -898,9 +906,13 @@ static gnutls_cipher_algorithm_t get_gnutls_cipher( const struct key *key )
@@ -895,9 +903,13 @@ static gnutls_cipher_algorithm_t get_gnutls_cipher( const struct key *key )
switch (key->alg_id)
{
case ALG_ID_AES:
@ -58,7 +58,7 @@ index 774f29a..a143580 100644
default:
FIXME( "algorithm %u not supported\n", key->alg_id );
return GNUTLS_CIPHER_UNKNOWN;
@@ -978,12 +990,14 @@ static NTSTATUS key_destroy( struct key *key )
@@ -1083,12 +1095,14 @@ static NTSTATUS key_destroy( struct key *key )
struct key
{
struct object hdr;
@ -73,7 +73,7 @@ index 774f29a..a143580 100644
return STATUS_NOT_IMPLEMENTED;
}
@@ -1063,17 +1077,37 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1168,17 +1182,37 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
padding, iv, iv_len, output, output_len, ret_len, flags );
if (!key || key->hdr.magic != MAGIC_KEY) return STATUS_INVALID_HANDLE;
@ -117,10 +117,10 @@ index 774f29a..a143580 100644
*ret_len = input_len;
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index 77aacdc..d2a74ce 100644
index c4b411d..2721d7d 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -1128,12 +1128,12 @@ static void test_BCryptEncrypt(void)
@@ -748,12 +748,12 @@ static void test_BCryptEncrypt(void)
memset(ciphertext, 0xff, sizeof(ciphertext));
memset(tag, 0xff, sizeof(tag));
ret = pBCryptEncrypt(key, data2, 32, &auth_info, ivbuf, 16, ciphertext, 32, &size, 0);
@ -137,7 +137,7 @@ index 77aacdc..d2a74ce 100644
for (i = 0; i < 16; i++)
todo_wine ok(tag[i] == expected_tag[i], "%u: %02x != %02x\n", i, tag[i], expected_tag[i]);
@@ -1143,12 +1143,12 @@ static void test_BCryptEncrypt(void)
@@ -763,12 +763,12 @@ static void test_BCryptEncrypt(void)
memset(ciphertext, 0xff, sizeof(ciphertext));
memset(tag, 0xff, sizeof(tag));
ret = pBCryptEncrypt(key, data2, 24, &auth_info, ivbuf, 16, ciphertext, 24, &size, 0);
@ -154,7 +154,7 @@ index 77aacdc..d2a74ce 100644
for (i = 0; i < 16; i++)
todo_wine ok(tag[i] == expected_tag2[i], "%u: %02x != %02x\n", i, tag[i], expected_tag2[i]);
@@ -1161,7 +1161,7 @@ static void test_BCryptEncrypt(void)
@@ -781,7 +781,7 @@ static void test_BCryptEncrypt(void)
memcpy(ivbuf, iv, sizeof(iv));
memset(ciphertext, 0, sizeof(ciphertext));
ret = pBCryptEncrypt(key, data2, 32, &auth_info, ivbuf, 16, ciphertext, 48, &size, BCRYPT_BLOCK_PADDING);
@ -164,5 +164,5 @@ index 77aacdc..d2a74ce 100644
ret = pBCryptDestroyKey(key);
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
--
2.9.0
1.9.1

View File

@ -1,7 +1,7 @@
From ebe7443d7e83bd4ba3143b52010ca97eaf767a9e Mon Sep 17 00:00:00 2001
From dac0dade33e4623251bc8375fb39b3d0fdc5cead Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 26 Dec 2016 07:53:10 +0100
Subject: bcrypt: Implement BCryptDecrypt for AES GCM mode.
Subject: [PATCH] bcrypt: Implement BCryptDecrypt for AES GCM mode.
---
dlls/bcrypt/bcrypt_main.c | 28 +++++++++++++++++++++++-----
@ -9,10 +9,10 @@ Subject: bcrypt: Implement BCryptDecrypt for AES GCM mode.
2 files changed, 27 insertions(+), 9 deletions(-)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 77db0b1..c41524d 100644
index b7e1957..c7298fb 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -1153,17 +1153,35 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1260,17 +1260,35 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
padding, iv, iv_len, output, output_len, ret_len, flags );
if (!key || key->hdr.magic != MAGIC_KEY) return STATUS_INVALID_HANDLE;
@ -54,10 +54,10 @@ index 77db0b1..c41524d 100644
*ret_len = input_len;
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index d2a74ce..3a1bc00 100644
index 2721d7d..2a646e8 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -1336,16 +1336,16 @@ static void test_BCryptDecrypt(void)
@@ -966,16 +966,16 @@ static void test_BCryptDecrypt(void)
memcpy(ivbuf, iv, sizeof(iv));
memset(plaintext, 0, sizeof(plaintext));
ret = pBCryptDecrypt(key, ciphertext4, 32, &auth_info, ivbuf, 16, plaintext, 32, &size, 0);
@ -79,5 +79,5 @@ index d2a74ce..3a1bc00 100644
ret = pBCryptDestroyKey(key);
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
--
2.9.0
1.9.1

View File

@ -1,4 +1,4 @@
From d31424121e0c29bd695cca9be5d7bd9b8f0e3c95 Mon Sep 17 00:00:00 2001
From 87e8a5e0eeaab01ae5092be876b8d6195e19ed5b 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:02:36 +0100
Subject: [PATCH] bcrypt: Add support for computing/comparing cipher tag.
@ -9,7 +9,7 @@ Subject: [PATCH] bcrypt: Add support for computing/comparing cipher tag.
2 files changed, 45 insertions(+), 6 deletions(-)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 7e760e6..fe91409 100644
index c7298fb..e7377f2 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -49,6 +49,9 @@ static HINSTANCE instance;

View File

@ -1,7 +1,7 @@
From 6d590beb24ef04948fe8e05fff3a72c1d415a7c1 Mon Sep 17 00:00:00 2001
From 2ee7e08d3f3da05d27ff004cac69aa136c93baf0 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.
Subject: [PATCH] bcrypt: Implement BCryptDuplicateKey.
---
dlls/bcrypt/bcrypt.spec | 2 +-
@ -10,7 +10,7 @@ Subject: bcrypt: Implement BCryptDuplicateKey.
3 files changed, 51 insertions(+), 2 deletions(-)
diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec
index 9ecd21d767c..f5911d2cd40 100644
index f00f55c..fcd0f6d 100644
--- a/dlls/bcrypt/bcrypt.spec
+++ b/dlls/bcrypt/bcrypt.spec
@@ -12,7 +12,7 @@
@ -23,10 +23,10 @@ index 9ecd21d767c..f5911d2cd40 100644
@ stdcall BCryptEnumAlgorithms(long ptr ptr long)
@ stub BCryptEnumContextFunctionProviders
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 198b010b27e..37d69095f7a 100644
index e7377f2..9b86812 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,
@@ -912,6 +912,24 @@ static NTSTATUS key_init( struct key *key, struct algorithm *alg, const UCHAR *s
return STATUS_SUCCESS;
}
@ -51,7 +51,7 @@ index 198b010b27e..37d69095f7a 100644
static gnutls_cipher_algorithm_t get_gnutls_cipher( const struct key *key )
{
switch (key->alg_id)
@@ -1028,6 +1046,13 @@ static NTSTATUS key_init( struct key *key, struct algorithm *alg, UCHAR *secret,
@@ -1133,6 +1151,13 @@ static NTSTATUS key_init( struct key *key, struct algorithm *alg, UCHAR *secret,
return STATUS_NOT_IMPLEMENTED;
}
@ -65,7 +65,7 @@ index 198b010b27e..37d69095f7a 100644
static NTSTATUS key_set_params( struct key *key, UCHAR *iv, ULONG iv_len )
{
ERR( "support for keys not available at build time\n" );
@@ -1087,6 +1112,30 @@ NTSTATUS WINAPI BCryptGenerateSymmetricKey( BCRYPT_ALG_HANDLE algorithm, BCRYPT_
@@ -1192,6 +1217,30 @@ NTSTATUS WINAPI BCryptGenerateSymmetricKey( BCRYPT_ALG_HANDLE algorithm, BCRYPT_
return STATUS_SUCCESS;
}
@ -97,7 +97,7 @@ index 198b010b27e..37d69095f7a 100644
{
struct key *key = handle;
diff --git a/dlls/ncrypt/ncrypt.spec b/dlls/ncrypt/ncrypt.spec
index 1a78853bf49..b14a332e18f 100644
index 5d37121..68735eb 100644
--- a/dlls/ncrypt/ncrypt.spec
+++ b/dlls/ncrypt/ncrypt.spec
@@ -14,7 +14,7 @@
@ -110,5 +110,5 @@ index 1a78853bf49..b14a332e18f 100644
@ stdcall BCryptEnumAlgorithms(long ptr ptr long) bcrypt.BCryptEnumAlgorithms
@ stub BCryptEnumContextFunctionProviders
--
2.11.0
1.9.1

View File

@ -1,14 +1,14 @@
From ec32e3345f5293704d8165c8428325e536986716 Mon Sep 17 00:00:00 2001
From 436f61185069a5b28a5e1036ac47e985eaee1d0d Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 26 Dec 2016 08:30:43 +0100
Subject: bcrypt/tests: Add tests for BCryptDuplicateKey.
Subject: [PATCH] bcrypt/tests: Add tests for BCryptDuplicateKey.
---
dlls/bcrypt/tests/bcrypt.c | 33 ++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index 5d8447c..a55d9a9 100644
index 887fe85..e33dcd3 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -45,6 +45,7 @@ static NTSTATUS (WINAPI *pBCryptEncrypt)(BCRYPT_KEY_HANDLE, PUCHAR, ULONG, VOID
@ -19,7 +19,7 @@ index 5d8447c..a55d9a9 100644
static NTSTATUS (WINAPI *pBCryptDestroyKey)(BCRYPT_KEY_HANDLE);
static void test_BCryptGenRandom(void)
@@ -880,7 +881,7 @@ static void test_BCryptGenerateSymmetricKey(void)
@@ -500,7 +501,7 @@ static void test_BCryptGenerateSymmetricKey(void)
static UCHAR expected[] =
{0xc6,0xa1,0x3b,0x37,0x87,0x8f,0x5b,0x82,0x6f,0x4f,0x81,0x62,0xa1,0xc8,0xd8,0x79};
BCRYPT_ALG_HANDLE aes;
@ -28,7 +28,7 @@ index 5d8447c..a55d9a9 100644
UCHAR *buf, ciphertext[16], plaintext[16], ivbuf[16];
ULONG size, len, i;
NTSTATUS ret;
@@ -923,6 +924,35 @@ static void test_BCryptGenerateSymmetricKey(void)
@@ -543,6 +544,35 @@ static void test_BCryptGenerateSymmetricKey(void)
for (i = 0; i < 16; i++)
ok(ciphertext[i] == expected[i], "%u: %02x != %02x\n", i, ciphertext[i], expected[i]);
@ -64,7 +64,7 @@ index 5d8447c..a55d9a9 100644
size = 0xdeadbeef;
ret = pBCryptDecrypt(key, NULL, 0, NULL, NULL, 0, NULL, 0, &size, 0);
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
@@ -1381,6 +1411,7 @@ START_TEST(bcrypt)
@@ -1011,6 +1041,7 @@ START_TEST(bcrypt)
pBCryptGenerateSymmetricKey = (void *)GetProcAddress(module, "BCryptGenerateSymmetricKey");
pBCryptEncrypt = (void *)GetProcAddress(module, "BCryptEncrypt");
pBCryptDecrypt = (void *)GetProcAddress(module, "BCryptDecrypt");
@ -73,5 +73,5 @@ index 5d8447c..a55d9a9 100644
test_BCryptGenRandom();
--
2.9.0
1.9.1

View File

@ -1,7 +1,7 @@
From bdebe07119a6ab2d3d3ba87f1d31ab0c4d998417 Mon Sep 17 00:00:00 2001
From 0143046b208f307d961e0f2a443c28b6d4459836 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:41:31 +0100
Subject: bcrypt: Allow to call BCryptSetProperty on key objects.
Subject: [PATCH] bcrypt: Allow to call BCryptSetProperty on key objects.
---
dlls/bcrypt/bcrypt_main.c | 38 ++++++++++++++++++++++++++++++++++++--
@ -9,10 +9,10 @@ Subject: bcrypt: Allow to call BCryptSetProperty on key objects.
2 files changed, 40 insertions(+), 2 deletions(-)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 5ca0c85e9ee..75b9765a602 100644
index 9b86812..a7e7afc 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -204,6 +204,9 @@ struct algorithm
@@ -245,6 +245,9 @@ struct algorithm
BOOL hmac;
};
@ -22,7 +22,7 @@ index 5ca0c85e9ee..75b9765a602 100644
NTSTATUS WINAPI BCryptGenRandom(BCRYPT_ALG_HANDLE handle, UCHAR *buffer, ULONG count, ULONG flags)
{
const DWORD supported_flags = BCRYPT_USE_SYSTEM_PREFERRED_RNG;
@@ -671,8 +674,8 @@ NTSTATUS WINAPI BCryptSetProperty( BCRYPT_HANDLE handle, const WCHAR *prop, UCHA
@@ -695,8 +698,8 @@ NTSTATUS WINAPI BCryptSetProperty( BCRYPT_HANDLE handle, const WCHAR *prop, UCHA
}
case MAGIC_KEY:
{
@ -33,7 +33,7 @@ index 5ca0c85e9ee..75b9765a602 100644
}
default:
WARN( "unknown magic %08x\n", object->magic );
@@ -903,6 +906,31 @@ static NTSTATUS key_duplicate( struct key *key_orig, struct key *key_copy )
@@ -930,6 +933,31 @@ static NTSTATUS key_duplicate( struct key *key_orig, struct key *key_copy )
return STATUS_SUCCESS;
}
@ -65,7 +65,7 @@ index 5ca0c85e9ee..75b9765a602 100644
static gnutls_cipher_algorithm_t get_gnutls_cipher( const struct key *key )
{
switch (key->alg_id)
@@ -1023,6 +1051,12 @@ static NTSTATUS key_duplicate( struct key *key_orig, struct key *key_copy )
@@ -1158,6 +1186,12 @@ static NTSTATUS key_duplicate( struct key *key_orig, struct key *key_copy )
return STATUS_NOT_IMPLEMENTED;
}
@ -79,10 +79,10 @@ index 5ca0c85e9ee..75b9765a602 100644
{
ERR( "support for keys not available at build time\n" );
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index f458ab5ce56..e00245556f4 100644
index e33dcd3..c826697 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -889,6 +889,10 @@ static void test_BCryptGenerateSymmetricKey(void)
@@ -523,6 +523,10 @@ static void test_BCryptGenerateSymmetricKey(void)
sizeof(BCRYPT_CHAIN_MODE_CBC), 0);
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
@ -94,5 +94,5 @@ index f458ab5ce56..e00245556f4 100644
ret = pBCryptEncrypt(key, NULL, 0, NULL, NULL, 0, NULL, 0, &size, 0);
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
--
2.11.0
1.9.1

View File

@ -1,14 +1,14 @@
From 89b061b83343ad1b0c16f936be3bcad78829d9e8 Mon Sep 17 00:00:00 2001
From c17ad9aa3225c31f132e1bf20da65ca36ae396e8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 26 Dec 2016 15:01:19 +0100
Subject: bcrypt: Add support for auth data in AES GCM mode.
Subject: [PATCH] bcrypt: Add support for auth data in AES GCM mode.
---
dlls/bcrypt/bcrypt_main.c | 38 ++++++++++++++++++++++++++++++++++++--
1 file changed, 36 insertions(+), 2 deletions(-)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 3638c77..34b6497 100644
index a7e7afc..0dc0645 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -50,7 +50,8 @@ static HINSTANCE instance;
@ -47,7 +47,7 @@ index 3638c77..34b6497 100644
if ((ret = pgnutls_global_init()) != GNUTLS_E_SUCCESS)
{
@@ -1011,6 +1022,19 @@ static NTSTATUS key_set_params( struct key *key, UCHAR *iv, ULONG iv_len )
@@ -1008,6 +1019,19 @@ static NTSTATUS key_set_params( struct key *key, UCHAR *iv, ULONG iv_len )
return STATUS_SUCCESS;
}
@ -67,7 +67,7 @@ index 3638c77..34b6497 100644
static NTSTATUS key_encrypt( struct key *key, const UCHAR *input, ULONG input_len, UCHAR *output,
ULONG output_len )
{
@@ -1090,6 +1114,12 @@ static NTSTATUS key_set_params( struct key *key, UCHAR *iv, ULONG iv_len )
@@ -1198,6 +1222,12 @@ static NTSTATUS key_set_params( struct key *key, UCHAR *iv, ULONG iv_len )
return STATUS_NOT_IMPLEMENTED;
}
@ -80,7 +80,7 @@ index 3638c77..34b6497 100644
static NTSTATUS key_encrypt( struct key *key, const UCHAR *input, ULONG input_len, UCHAR *output,
ULONG output_len )
{
@@ -1215,6 +1245,8 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1323,6 +1353,8 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
if (!output) return STATUS_SUCCESS;
if (output_len < *ret_len) return STATUS_BUFFER_TOO_SMALL;
@ -89,7 +89,7 @@ index 3638c77..34b6497 100644
if ((status = key_encrypt( key, input, input_len, output, output_len )))
return status;
@@ -1292,6 +1324,8 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1400,6 +1432,8 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
if (!output) return STATUS_SUCCESS;
if (output_len < *ret_len) return STATUS_BUFFER_TOO_SMALL;
@ -99,5 +99,5 @@ index 3638c77..34b6497 100644
return status;
--
2.9.0
1.9.1

View File

@ -1,17 +1,17 @@
From 3ca362011e98a7bebb145243c3e62f6e84933766 Mon Sep 17 00:00:00 2001
From a03acf90d2f3803b3fb923d2ab337abfa9421a78 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 26 Dec 2016 15:01:38 +0100
Subject: bcrypt/tests: Add tests for auth data in AES GCM mode.
Subject: [PATCH] bcrypt/tests: Add tests for auth data in AES GCM mode.
---
dlls/bcrypt/tests/bcrypt.c | 44 ++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 42 insertions(+), 2 deletions(-)
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index 2bc5f89b91c..9dbf88f08f7 100644
index c826697..fafc4a1 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -884,7 +884,9 @@ static void test_BCryptGenerateSymmetricKey(void)
@@ -607,7 +607,9 @@ static void test_BCryptGenerateSymmetricKey(void)
static void test_BCryptEncrypt(void)
{
static UCHAR nonce[] =
@ -22,7 +22,7 @@ index 2bc5f89b91c..9dbf88f08f7 100644
static UCHAR secret[] =
{0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f};
static UCHAR iv[] =
@@ -910,6 +912,8 @@ static void test_BCryptEncrypt(void)
@@ -633,6 +635,8 @@ static void test_BCryptEncrypt(void)
{0x89,0xb3,0x92,0x00,0x39,0x20,0x09,0xb4,0x6a,0xd6,0xaf,0xca,0x4b,0x5b,0xfd,0xd0};
static UCHAR expected_tag2[] =
{0x9a,0x92,0x32,0x2c,0x61,0x2a,0xae,0xef,0x66,0x2a,0xfb,0x55,0xe9,0x48,0xdf,0xbd};
@ -31,7 +31,7 @@ index 2bc5f89b91c..9dbf88f08f7 100644
BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO auth_info;
UCHAR *buf, ciphertext[48], ivbuf[16], tag[16];
BCRYPT_AUTH_TAG_LENGTHS_STRUCT tag_length;
@@ -1083,6 +1087,24 @@ static void test_BCryptEncrypt(void)
@@ -806,6 +810,24 @@ static void test_BCryptEncrypt(void)
for (i = 0; i < 16; i++)
ok(tag[i] == expected_tag2[i], "%u: %02x != %02x\n", i, tag[i], expected_tag2[i]);
@ -56,7 +56,7 @@ index 2bc5f89b91c..9dbf88f08f7 100644
/* test with padding */
memcpy(ivbuf, iv, sizeof(iv));
memset(ciphertext, 0, sizeof(ciphertext));
@@ -1105,7 +1127,9 @@ static void test_BCryptEncrypt(void)
@@ -828,7 +850,9 @@ static void test_BCryptEncrypt(void)
static void test_BCryptDecrypt(void)
{
static UCHAR nonce[] =
@ -67,7 +67,7 @@ index 2bc5f89b91c..9dbf88f08f7 100644
static UCHAR secret[] =
{0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f};
static UCHAR iv[] =
@@ -1132,6 +1156,8 @@ static void test_BCryptDecrypt(void)
@@ -855,6 +879,8 @@ static void test_BCryptDecrypt(void)
0x86,0x64,0xc3,0xfe,0xa3,0x07,0x61,0xf8,0x16,0xc9,0x78,0x7f,0xe7,0xb1,0xc4,0x94};
static UCHAR tag[] =
{0x89,0xb3,0x92,0x00,0x39,0x20,0x09,0xb4,0x6a,0xd6,0xaf,0xca,0x4b,0x5b,0xfd,0xd0};
@ -76,7 +76,7 @@ index 2bc5f89b91c..9dbf88f08f7 100644
BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO auth_info;
BCRYPT_KEY_LENGTHS_STRUCT key_lengths;
BCRYPT_ALG_HANDLE aes;
@@ -1281,6 +1307,20 @@ static void test_BCryptDecrypt(void)
@@ -1004,6 +1030,20 @@ static void test_BCryptDecrypt(void)
ok(size == 32, "got %u\n", size);
ok(!memcmp(plaintext, expected3, sizeof(expected3)), "wrong data\n");
@ -98,5 +98,5 @@ index 2bc5f89b91c..9dbf88f08f7 100644
memcpy(ivbuf, iv, sizeof(iv));
auth_info.pbTag = iv; /* wrong tag */
--
2.13.1
1.9.1

View File

@ -1,17 +1,18 @@
From b7aa5302f9f16e906968b0a4483988f4e99a44b2 Mon Sep 17 00:00:00 2001
From be6a7cd60499a83baff70922b253c477401b76b9 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 26 Dec 2016 16:20:57 +0100
Subject: bcrypt: Avoid crash in tests when compiling without gnutls support.
Subject: [PATCH] bcrypt: Avoid crash in tests when compiling without gnutls
support.
---
dlls/bcrypt/bcrypt_main.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 75eaf46..564b2a5 100644
index 0dc0645..036a92d 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -1163,12 +1163,17 @@ NTSTATUS WINAPI BCryptGenerateSymmetricKey( BCRYPT_ALG_HANDLE algorithm, BCRYPT_
@@ -1268,12 +1268,17 @@ NTSTATUS WINAPI BCryptGenerateSymmetricKey( BCRYPT_ALG_HANDLE algorithm, BCRYPT_
if (!alg || alg->hdr.magic != MAGIC_ALG) return STATUS_INVALID_HANDLE;
if (object) FIXME( "ignoring object buffer\n" );
@ -30,7 +31,7 @@ index 75eaf46..564b2a5 100644
return status;
}
@@ -1188,11 +1193,15 @@ NTSTATUS WINAPI BCryptDuplicateKey( BCRYPT_KEY_HANDLE handle, BCRYPT_KEY_HANDLE
@@ -1293,11 +1298,15 @@ NTSTATUS WINAPI BCryptDuplicateKey( BCRYPT_KEY_HANDLE handle, BCRYPT_KEY_HANDLE
if (!key_orig || key_orig->hdr.magic != MAGIC_KEY) return STATUS_INVALID_HANDLE;
if (!handle_copy) return STATUS_INVALID_PARAMETER;
if (!(key_copy = HeapAlloc( GetProcessHeap(), 0, sizeof(*key_copy) )))
@ -47,5 +48,5 @@ index 75eaf46..564b2a5 100644
}
--
2.9.0
1.9.1

View File

@ -1,18 +1,18 @@
From cbf5204cddb1146f236c04660856418074c613d7 Mon Sep 17 00:00:00 2001
From 5c5e35a8418c64ee5b79ffc96b81d66e0b12c743 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 5 Mar 2017 23:18:03 +0100
Subject: bcrypt: Implement support for ECB chain mode.
Subject: [PATCH] bcrypt: Implement support for ECB chain mode.
---
dlls/bcrypt/bcrypt_main.c | 43 ++++++++--
dlls/bcrypt/tests/bcrypt.c | 206 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 240 insertions(+), 9 deletions(-)
dlls/bcrypt/tests/bcrypt.c | 210 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 244 insertions(+), 9 deletions(-)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 1b548c9f406..a161eb26d8f 100644
index 036a92d..a471d51 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -186,6 +186,7 @@ enum alg_id
@@ -224,6 +224,7 @@ enum alg_id
enum mode_id
{
@ -20,7 +20,7 @@ index 1b548c9f406..a161eb26d8f 100644
MODE_ID_CBC,
MODE_ID_GCM
};
@@ -519,8 +520,9 @@ static NTSTATUS get_alg_property( const struct algorithm *alg, const WCHAR *prop
@@ -576,8 +577,9 @@ static NTSTATUS get_alg_property( const struct algorithm *alg, const WCHAR *prop
const WCHAR *mode;
switch (alg->mode)
{
@ -31,7 +31,7 @@ index 1b548c9f406..a161eb26d8f 100644
default: return STATUS_NOT_IMPLEMENTED;
}
@@ -619,7 +621,12 @@ static NTSTATUS set_alg_property( struct algorithm *alg, const WCHAR *prop, UCHA
@@ -630,7 +632,12 @@ static NTSTATUS set_alg_property( struct algorithm *alg, const WCHAR *prop, UCHA
case ALG_ID_AES:
if (!strcmpW( prop, BCRYPT_CHAINING_MODE ))
{
@ -45,7 +45,7 @@ index 1b548c9f406..a161eb26d8f 100644
{
alg->mode = MODE_ID_CBC;
return STATUS_SUCCESS;
@@ -951,7 +958,12 @@ static NTSTATUS set_key_property( struct key *key, const WCHAR *prop, UCHAR *val
@@ -948,7 +955,12 @@ static NTSTATUS set_key_property( struct key *key, const WCHAR *prop, UCHAR *val
{
if (!strcmpW( prop, BCRYPT_CHAINING_MODE ))
{
@ -59,7 +59,7 @@ index 1b548c9f406..a161eb26d8f 100644
{
key->mode = MODE_ID_CBC;
return STATUS_SUCCESS;
@@ -981,6 +993,7 @@ static gnutls_cipher_algorithm_t get_gnutls_cipher( const struct key *key )
@@ -978,6 +990,7 @@ static gnutls_cipher_algorithm_t get_gnutls_cipher( const struct key *key )
switch (key->mode)
{
case MODE_ID_GCM: return GNUTLS_CIPHER_AES_128_GCM;
@ -67,7 +67,7 @@ index 1b548c9f406..a161eb26d8f 100644
case MODE_ID_CBC:
default: return GNUTLS_CIPHER_AES_128_CBC;
}
@@ -992,6 +1005,7 @@ static gnutls_cipher_algorithm_t get_gnutls_cipher( const struct key *key )
@@ -989,6 +1002,7 @@ static gnutls_cipher_algorithm_t get_gnutls_cipher( const struct key *key )
static NTSTATUS key_set_params( struct key *key, UCHAR *iv, ULONG iv_len )
{
@ -75,7 +75,7 @@ index 1b548c9f406..a161eb26d8f 100644
gnutls_cipher_algorithm_t cipher;
gnutls_datum_t secret, vector;
int ret;
@@ -1005,15 +1019,18 @@ static NTSTATUS key_set_params( struct key *key, UCHAR *iv, ULONG iv_len )
@@ -1002,15 +1016,18 @@ static NTSTATUS key_set_params( struct key *key, UCHAR *iv, ULONG iv_len )
if ((cipher = get_gnutls_cipher( key )) == GNUTLS_CIPHER_UNKNOWN)
return STATUS_NOT_SUPPORTED;
@ -100,7 +100,7 @@ index 1b548c9f406..a161eb26d8f 100644
{
pgnutls_perror( ret );
return STATUS_INTERNAL_ERROR;
@@ -1277,11 +1294,15 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1382,11 +1399,15 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
if (!output) return STATUS_SUCCESS;
if (output_len < *ret_len) return STATUS_BUFFER_TOO_SMALL;
@ -116,7 +116,7 @@ index 1b548c9f406..a161eb26d8f 100644
bytes_left -= key->block_size;
src += key->block_size;
dst += key->block_size;
@@ -1364,11 +1385,15 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1469,11 +1490,15 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
else if (output_len < *ret_len)
return STATUS_BUFFER_TOO_SMALL;
@ -133,10 +133,10 @@ index 1b548c9f406..a161eb26d8f 100644
src += key->block_size;
dst += key->block_size;
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index 8be4c5b809d..aa8e7e17490 100644
index fafc4a1..f9bf77b 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -997,6 +997,15 @@ static void test_BCryptEncrypt(void)
@@ -631,6 +631,15 @@ static void test_BCryptEncrypt(void)
static UCHAR expected4[] =
{0xe1,0x82,0xc3,0xc0,0x24,0xfb,0x86,0x85,0xf3,0xf1,0x2b,0x7d,0x09,0xb4,0x73,0x67,
0x86,0x64,0xc3,0xfe,0xa3,0x07,0x61,0xf8,0x16,0xc9,0x78,0x7f,0xe7,0xb1,0xc4,0x94};
@ -152,7 +152,7 @@ index 8be4c5b809d..aa8e7e17490 100644
static UCHAR expected_tag[] =
{0x89,0xb3,0x92,0x00,0x39,0x20,0x09,0xb4,0x6a,0xd6,0xaf,0xca,0x4b,0x5b,0xfd,0xd0};
static UCHAR expected_tag2[] =
@@ -1209,6 +1218,97 @@ static void test_BCryptEncrypt(void)
@@ -843,6 +852,97 @@ static void test_BCryptEncrypt(void)
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
HeapFree(GetProcessHeap(), 0, buf);
@ -250,7 +250,7 @@ index 8be4c5b809d..aa8e7e17490 100644
ret = pBCryptCloseAlgorithmProvider(aes, 0);
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
}
@@ -1243,6 +1343,13 @@ static void test_BCryptDecrypt(void)
@@ -877,6 +977,13 @@ static void test_BCryptDecrypt(void)
static UCHAR ciphertext4[] =
{0xe1,0x82,0xc3,0xc0,0x24,0xfb,0x86,0x85,0xf3,0xf1,0x2b,0x7d,0x09,0xb4,0x73,0x67,
0x86,0x64,0xc3,0xfe,0xa3,0x07,0x61,0xf8,0x16,0xc9,0x78,0x7f,0xe7,0xb1,0xc4,0x94};
@ -264,7 +264,7 @@ index 8be4c5b809d..aa8e7e17490 100644
static UCHAR tag[] =
{0x89,0xb3,0x92,0x00,0x39,0x20,0x09,0xb4,0x6a,0xd6,0xaf,0xca,0x4b,0x5b,0xfd,0xd0};
static UCHAR tag2[] =
@@ -1411,6 +1518,105 @@ static void test_BCryptDecrypt(void)
@@ -1055,6 +1162,109 @@ static void test_BCryptDecrypt(void)
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
HeapFree(GetProcessHeap(), 0, buf);
@ -366,10 +366,14 @@ index 8be4c5b809d..aa8e7e17490 100644
+ ret = pBCryptDestroyKey(key);
+ ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ HeapFree(GetProcessHeap(), 0, buf);
+
+ ret = pBCryptDestroyKey(key);
+ ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+ HeapFree(GetProcessHeap(), 0, buf);
+
ret = pBCryptCloseAlgorithmProvider(aes, 0);
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
}
--
2.11.0
1.9.1

View File

@ -1,7 +1,8 @@
From 9d4cfb266667d09430c5036ef127d30d5ac5ffbe Mon Sep 17 00:00:00 2001
From 5ed0e3dc801a79e8a187c1006e4b829427814135 Mon Sep 17 00:00:00 2001
From: Andrew Wesie <awesie@gmail.com>
Date: Mon, 1 May 2017 22:57:43 -0500
Subject: bcrypt: Fix BCryptEncrypt with AES_GCM and no input and no output.
Subject: [PATCH] bcrypt: Fix BCryptEncrypt with AES_GCM and no input and no
output.
Signed-off-by: Andrew Wesie <awesie@gmail.com>
---
@ -10,10 +11,10 @@ Signed-off-by: Andrew Wesie <awesie@gmail.com>
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index c25f1d1e99..d269083eca 100644
index a471d51..d985337 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -1185,7 +1185,7 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1376,7 +1376,7 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
*ret_len = input_len;
if (flags & BCRYPT_BLOCK_PADDING) return STATUS_INVALID_PARAMETER;
@ -23,10 +24,10 @@ index c25f1d1e99..d269083eca 100644
if (auth_info->pbAuthData && (status = key_set_auth_data( key, auth_info->pbAuthData, auth_info->cbAuthData )))
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index 7f01529b3b..9f34a54978 100644
index f9bf77b..ed73db5 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -913,6 +913,9 @@ static void test_BCryptEncrypt(void)
@@ -646,6 +646,9 @@ static void test_BCryptEncrypt(void)
{0x9a,0x92,0x32,0x2c,0x61,0x2a,0xae,0xef,0x66,0x2a,0xfb,0x55,0xe9,0x48,0xdf,0xbd};
static UCHAR expected_tag3[] =
{0x17,0x9d,0xc0,0x7a,0xf0,0xcf,0xaa,0xd5,0x1c,0x11,0xc4,0x4b,0xd6,0xa3,0x3e,0x77};
@ -36,7 +37,7 @@ index 7f01529b3b..9f34a54978 100644
BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO auth_info;
UCHAR *buf, ciphertext[48], ivbuf[16], tag[16];
BCRYPT_AUTH_TAG_LENGTHS_STRUCT tag_length;
@@ -1104,6 +1107,21 @@ static void test_BCryptEncrypt(void)
@@ -837,6 +840,21 @@ static void test_BCryptEncrypt(void)
for (i = 0; i < 16; i++)
ok(tag[i] == expected_tag3[i], "%u: %02x != %02x\n", i, tag[i], expected_tag3[i]);
@ -59,5 +60,5 @@ index 7f01529b3b..9f34a54978 100644
memcpy(ivbuf, iv, sizeof(iv));
memset(ciphertext, 0, sizeof(ciphertext));
--
2.12.2
1.9.1

View File

@ -1,4 +1,4 @@
From 1283926e7c5c3d872a286c9cfa190ef3c7459397 Mon Sep 17 00:00:00 2001
From 8dec986ed00a13f49022bedd5b63c1b9343a9709 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 13 Aug 2017 04:28:43 +0200
Subject: [PATCH] bcrypt: Partial implementation of BCryptImportKey and
@ -35,7 +35,7 @@ index fcd0f6d..28c2394 100644
@ stdcall BCryptOpenAlgorithmProvider(ptr wstr wstr long)
@ stub BCryptQueryContextConfiguration
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index b523019..60825f4 100644
index d985337..46e7ab1 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -1090,6 +1090,13 @@ static NTSTATUS key_get_tag( struct key *key, UCHAR *tag, ULONG len )
@ -161,7 +161,7 @@ index b523019..60825f4 100644
{
struct key *key = handle;
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index 02e0f52..6fa0329 100644
index ed73db5..d52c79d 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -47,6 +47,9 @@ static NTSTATUS (WINAPI *pBCryptDecrypt)(BCRYPT_KEY_HANDLE, PUCHAR, ULONG, VOID
@ -174,7 +174,7 @@ index 02e0f52..6fa0329 100644
static void test_BCryptGenRandom(void)
{
@@ -1283,6 +1286,46 @@ static void test_BCryptDecrypt(void)
@@ -1287,6 +1290,46 @@ static void test_BCryptDecrypt(void)
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
}
@ -221,7 +221,7 @@ index 02e0f52..6fa0329 100644
START_TEST(bcrypt)
{
HMODULE module;
@@ -1311,6 +1354,8 @@ START_TEST(bcrypt)
@@ -1315,6 +1358,8 @@ START_TEST(bcrypt)
pBCryptDecrypt = (void *)GetProcAddress(module, "BCryptDecrypt");
pBCryptDuplicateKey = (void *)GetProcAddress(module, "BCryptDuplicateKey");
pBCryptDestroyKey = (void *)GetProcAddress(module, "BCryptDestroyKey");
@ -230,7 +230,7 @@ index 02e0f52..6fa0329 100644
test_BCryptGenRandom();
test_BCryptGetFipsAlgorithmMode();
@@ -1320,6 +1365,7 @@ START_TEST(bcrypt)
@@ -1324,6 +1369,7 @@ START_TEST(bcrypt)
test_BCryptGenerateSymmetricKey();
test_BCryptEncrypt();
test_BCryptDecrypt();

View File

@ -1,7 +1,7 @@
From 5a85641dc1c7903383d471df7e34977d0e56c1c9 Mon Sep 17 00:00:00 2001
From 74d179cafdabfeb5139a9e22b9a2dfbf1884dcc8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 13 Aug 2017 05:04:21 +0200
Subject: bcrypt: Add support for 192 and 256 bit aes keys.
Subject: [PATCH] bcrypt: Add support for 192 and 256 bit aes keys.
---
dlls/bcrypt/bcrypt_main.c | 14 ++++++++++++--
@ -9,10 +9,10 @@ Subject: bcrypt: Add support for 192 and 256 bit aes keys.
2 files changed, 44 insertions(+), 2 deletions(-)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 2b476484a52..e68c5e67516 100644
index 46e7ab1..0c07c1f 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -906,11 +906,21 @@ static gnutls_cipher_algorithm_t get_gnutls_cipher( const struct key *key )
@@ -989,11 +989,21 @@ static gnutls_cipher_algorithm_t get_gnutls_cipher( const struct key *key )
WARN( "handle block size\n" );
switch (key->mode)
{
@ -37,10 +37,10 @@ index 2b476484a52..e68c5e67516 100644
FIXME( "algorithm %u not supported\n", key->alg_id );
return GNUTLS_CIPHER_UNKNOWN;
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index 32e25a94a55..98d4961879c 100644
index d52c79d..396f553 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -882,6 +882,9 @@ static void test_BCryptEncrypt(void)
@@ -615,6 +615,9 @@ static void test_BCryptEncrypt(void)
{0x60,0x50,0x40,0x30,0x20,0x10,0x60,0x50,0x40,0x30,0x20,0x10};
static UCHAR secret[] =
{0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f};
@ -50,7 +50,7 @@ index 32e25a94a55..98d4961879c 100644
static UCHAR iv[] =
{0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f};
static UCHAR data[] =
@@ -910,6 +913,10 @@ static void test_BCryptEncrypt(void)
@@ -643,6 +646,10 @@ static void test_BCryptEncrypt(void)
{0x0a,0x94,0x0b,0xb5,0x41,0x6e,0xf0,0x45,0xf1,0xc3,0x94,0x58,0xc6,0x53,0xea,0x5a,
0x95,0x4f,0x64,0xf2,0xe4,0xe8,0x6e,0x9e,0xee,0x82,0xd2,0x02,0x16,0x68,0x48,0x99,
0x95,0x4f,0x64,0xf2,0xe4,0xe8,0x6e,0x9e,0xee,0x82,0xd2,0x02,0x16,0x68,0x48,0x99};
@ -61,7 +61,7 @@ index 32e25a94a55..98d4961879c 100644
static UCHAR expected_tag[] =
{0x89,0xb3,0x92,0x00,0x39,0x20,0x09,0xb4,0x6a,0xd6,0xaf,0xca,0x4b,0x5b,0xfd,0xd0};
static UCHAR expected_tag2[] =
@@ -1020,6 +1027,31 @@ static void test_BCryptEncrypt(void)
@@ -1130,6 +1137,31 @@ static void test_BCryptDecrypt(void)
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
HeapFree(GetProcessHeap(), 0, buf);
@ -94,5 +94,5 @@ index 32e25a94a55..98d4961879c 100644
* AES - GCM mode *
******************/
--
2.13.1
1.9.1

View File

@ -1,14 +1,14 @@
From 4c8edad4d1caeed9965913f559eec4e379fd2337 Mon Sep 17 00:00:00 2001
From ae76b1d04b4c6b2fafce2a9fcef3e1dfdecc4fcc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 29 Sep 2017 18:31:55 +0200
Subject: [PATCH] bcrypt: Preparation for asymmetric keys.
---
dlls/bcrypt/bcrypt_main.c | 316 ++++++++++++++++++++++++++++++----------------
1 file changed, 206 insertions(+), 110 deletions(-)
dlls/bcrypt/bcrypt_main.c | 313 ++++++++++++++++++++++++++++++----------------
1 file changed, 205 insertions(+), 108 deletions(-)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index d089bad..0eca8e6 100644
index 0c07c1f..1d5d873 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -237,16 +237,17 @@ static const struct {
@ -54,7 +54,7 @@ index d089bad..0eca8e6 100644
ULONG secret_len;
};
-static NTSTATUS key_init( struct key *key, enum alg_id id, const UCHAR *secret, ULONG secret_len )
-static NTSTATUS key_init( struct key *key, struct algorithm *alg, const UCHAR *secret, ULONG secret_len )
+struct key
+{
+ struct object hdr;
@ -69,7 +69,7 @@ index d089bad..0eca8e6 100644
{
UCHAR *buffer;
@@ -920,34 +929,64 @@ static NTSTATUS key_init( struct key *key, enum alg_id id, const UCHAR *secret,
@@ -920,34 +929,64 @@ static NTSTATUS key_init( struct key *key, struct algorithm *alg, const UCHAR *s
return STATUS_NOT_SUPPORTED;
}
@ -326,12 +326,8 @@ index d089bad..0eca8e6 100644
HeapFree( GetProcessHeap(), 0, key );
return STATUS_SUCCESS;
}
@@ -1226,21 +1271,41 @@ static NTSTATUS key_destroy( struct key *key )
struct key
{
struct object hdr;
- enum mode_id mode;
- ULONG block_size;
@@ -1230,59 +1275,80 @@ struct key
ULONG block_size;
};
-static NTSTATUS key_init( struct key *key, struct algorithm *alg, UCHAR *secret, ULONG secret_len )
@ -344,8 +340,7 @@ index d089bad..0eca8e6 100644
+static inline BOOL key_is_asymmetric( struct key *key )
+{
+ ERR( "support for keys not available at build time\n" );
+ return FALSE;
+}
+};
+
+static NTSTATUS key_symmetric_init( struct key *key, struct algorithm *alg, UCHAR *secret, ULONG secret_len )
{
@ -356,24 +351,26 @@ index d089bad..0eca8e6 100644
static NTSTATUS key_duplicate( struct key *key_orig, struct key *key_copy )
{
ERR( "support for keys not available at build time\n" );
- key_copy->mode = MODE_ID_CBC;
+ ERR( "support for keys not available at build time\n" );
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+static NTSTATUS key_symmetric_get_mode( struct key *key, enum mode_id *mode )
+{
+ ERR( "support for keys not available at build time\n" );
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+static NTSTATUS key_symmetric_get_blocksize( struct key *key, ULONG *size )
+{
+ ERR( "support for keys not available at build time\n" );
ERR( "support for keys not available at build time\n" );
- key_copy->mode = MODE_ID_CBC;
return STATUS_NOT_IMPLEMENTED;
}
@@ -1250,39 +1315,39 @@ static NTSTATUS set_key_property( struct key *key, const WCHAR *prop, UCHAR *val
+static NTSTATUS key_symmetric_get_blocksize( struct key *key, ULONG *size )
+{
+ ERR( "support for keys not available at build time\n" );
+}
+
+
static NTSTATUS set_key_property( struct key *key, const WCHAR *prop, UCHAR *value, ULONG size, ULONG flags )
{
ERR( "support for keys not available at build time\n" );
return STATUS_NOT_IMPLEMENTED;
}
@ -419,7 +416,7 @@ index d089bad..0eca8e6 100644
{
ERR( "support for keys not available at build time\n" );
return STATUS_NOT_IMPLEMENTED;
@@ -1315,7 +1380,7 @@ NTSTATUS WINAPI BCryptGenerateSymmetricKey( BCRYPT_ALG_HANDLE algorithm, BCRYPT_
@@ -1315,7 +1381,7 @@ NTSTATUS WINAPI BCryptGenerateSymmetricKey( BCRYPT_ALG_HANDLE algorithm, BCRYPT_
}
key->hdr.magic = MAGIC_KEY;
@ -428,7 +425,7 @@ index d089bad..0eca8e6 100644
{
HeapFree( GetProcessHeap(), 0, key );
*handle = NULL;
@@ -1412,13 +1477,19 @@ NTSTATUS WINAPI BCryptExportKey( BCRYPT_KEY_HANDLE export_key, BCRYPT_KEY_HANDLE
@@ -1412,13 +1478,19 @@ NTSTATUS WINAPI BCryptExportKey( BCRYPT_KEY_HANDLE export_key, BCRYPT_KEY_HANDLE
if (!key || key->hdr.magic != MAGIC_KEY) return STATUS_INVALID_HANDLE;
if (!output || !output_len || !size) return STATUS_INVALID_PARAMETER;
@ -449,7 +446,7 @@ index d089bad..0eca8e6 100644
return status;
if (!strcmpW( type, BCRYPT_KEY_DATA_BLOB ))
@@ -1459,19 +1530,30 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1459,19 +1531,30 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
struct key *key = handle;
ULONG bytes_left = input_len;
UCHAR *buf, *src, *dst;
@ -481,7 +478,7 @@ index d089bad..0eca8e6 100644
{
BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO *auth_info = padding;
@@ -1482,7 +1564,7 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1482,7 +1565,7 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
if (auth_info->dwFlags & BCRYPT_AUTH_MODE_CHAIN_CALLS_FLAG)
FIXME( "call chaining not implemented\n" );
@ -490,7 +487,7 @@ index d089bad..0eca8e6 100644
return status;
*ret_len = input_len;
@@ -1490,46 +1572,48 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1490,46 +1573,48 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
if (input && !output) return STATUS_SUCCESS;
if (output_len < *ret_len) return STATUS_BUFFER_TOO_SMALL;
@ -555,7 +552,7 @@ index d089bad..0eca8e6 100644
HeapFree( GetProcessHeap(), 0, buf );
}
@@ -1543,19 +1627,30 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1543,19 +1628,30 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
struct key *key = handle;
ULONG bytes_left = input_len;
UCHAR *buf, *src, *dst;
@ -587,7 +584,7 @@ index d089bad..0eca8e6 100644
{
BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO *auth_info = padding;
UCHAR tag[16];
@@ -1565,7 +1660,7 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1565,7 +1661,7 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
if (!auth_info->pbTag) return STATUS_INVALID_PARAMETER;
if (auth_info->cbTag < 12 || auth_info->cbTag > 16) return STATUS_INVALID_PARAMETER;
@ -596,7 +593,7 @@ index d089bad..0eca8e6 100644
return status;
*ret_len = input_len;
@@ -1573,12 +1668,12 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1573,12 +1669,12 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
if (!output) return STATUS_SUCCESS;
if (output_len < *ret_len) return STATUS_BUFFER_TOO_SMALL;
@ -612,7 +609,7 @@ index d089bad..0eca8e6 100644
return status;
if (memcmp( tag, auth_info->pbTag, auth_info->cbTag ))
return STATUS_AUTH_TAG_MISMATCH;
@@ -1586,44 +1681,45 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1586,44 +1682,45 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
return STATUS_SUCCESS;
}

View File

@ -1,7 +1,8 @@
From 4deacb4fe26419c2c3e7e9e7b194736e2f0b6063 Mon Sep 17 00:00:00 2001
From 108e7d128d29d8666ab3818234d81d4c98a6b15f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 29 Sep 2017 18:49:09 +0200
Subject: include: Add ecdsa and asymmetric key related bcrypt definitions.
Subject: [PATCH] include: Add ecdsa and asymmetric key related bcrypt
definitions.
---
include/bcrypt.h | 28 ++++++++++++++++++++++++++++
@ -9,7 +10,7 @@ Subject: include: Add ecdsa and asymmetric key related bcrypt definitions.
2 files changed, 30 insertions(+)
diff --git a/include/bcrypt.h b/include/bcrypt.h
index de812ffe333..f524cb9afdc 100644
index 81822af..9e5cd58 100644
--- a/include/bcrypt.h
+++ b/include/bcrypt.h
@@ -61,6 +61,8 @@ typedef LONG NTSTATUS;
@ -21,7 +22,7 @@ index de812ffe333..f524cb9afdc 100644
#define MS_PRIMITIVE_PROVIDER (const WCHAR [])\
{'M','i','c','r','o','s','o','f','t',' ','P','r','i','m','i','t','i','v','e',' ','P','r','o','v','i','d','e','r',0}
@@ -74,6 +76,9 @@ typedef LONG NTSTATUS;
@@ -76,6 +78,9 @@ typedef LONG NTSTATUS;
#define BCRYPT_SHA256_ALGORITHM (const WCHAR []){'S','H','A','2','5','6',0}
#define BCRYPT_SHA384_ALGORITHM (const WCHAR []){'S','H','A','3','8','4',0}
#define BCRYPT_SHA512_ALGORITHM (const WCHAR []){'S','H','A','5','1','2',0}
@ -31,7 +32,7 @@ index de812ffe333..f524cb9afdc 100644
#define BCRYPT_CHAIN_MODE_NA (const WCHAR []){'C','h','a','i','n','i','n','g','M','o','d','e','N','/','A',0}
#define BCRYPT_CHAIN_MODE_CBC (const WCHAR []){'C','h','a','i','n','i','n','g','M','o','d','e','C','B','C',0}
@@ -82,6 +87,13 @@ typedef LONG NTSTATUS;
@@ -84,6 +89,13 @@ typedef LONG NTSTATUS;
#define BCRYPT_CHAIN_MODE_CCM (const WCHAR []){'C','h','a','i','n','i','n','g','M','o','d','e','C','C','M',0}
#define BCRYPT_CHAIN_MODE_GCM (const WCHAR []){'C','h','a','i','n','i','n','g','M','o','d','e','G','C','M',0}
@ -45,7 +46,7 @@ index de812ffe333..f524cb9afdc 100644
typedef struct _BCRYPT_ALGORITHM_IDENTIFIER
{
LPWSTR pszName;
@@ -120,6 +132,22 @@ typedef struct _BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO
@@ -122,6 +134,22 @@ typedef struct _BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO
ULONG dwFlags;
} BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO, *PBCRYPT_AUTHENTICATED_CIPHER_MODE_INFO;
@ -69,7 +70,7 @@ index de812ffe333..f524cb9afdc 100644
#define BCRYPT_AUTH_MODE_CHAIN_CALLS_FLAG 0x00000001
diff --git a/include/ntstatus.h b/include/ntstatus.h
index 7026de7f85f..735b6c2c41c 100644
index 7026de7..735b6c2 100644
--- a/include/ntstatus.h
+++ b/include/ntstatus.h
@@ -990,6 +990,8 @@
@ -82,5 +83,5 @@ index 7026de7f85f..735b6c2c41c 100644
#define RPC_NT_INVALID_STRING_BINDING ((NTSTATUS) 0xC0020001)
--
2.14.1
1.9.1

View File

@ -1,14 +1,14 @@
From bbc4343e5ce6b5a5404dbd9d61ce7f49f042da52 Mon Sep 17 00:00:00 2001
From 00f07aee7bf6ac092d9e1d57ef649e4cb6ae181d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 29 Sep 2017 18:50:04 +0200
Subject: bcrypt/tests: Add basic test for ecdsa.
Subject: [PATCH] bcrypt/tests: Add basic test for ecdsa.
---
dlls/bcrypt/tests/bcrypt.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 65 insertions(+)
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index ae48914b5de..be901202970 100644
index 396f553..699d6aa 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -50,6 +50,8 @@ static NTSTATUS (WINAPI *pBCryptDestroyKey)(BCRYPT_KEY_HANDLE);
@ -20,7 +20,7 @@ index ae48914b5de..be901202970 100644
static void test_BCryptGenRandom(void)
{
@@ -1635,6 +1637,66 @@ static void test_key_import_export(void)
@@ -1362,6 +1364,66 @@ static void test_key_import_export(void)
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
}
@ -87,7 +87,7 @@ index ae48914b5de..be901202970 100644
START_TEST(bcrypt)
{
HMODULE module;
@@ -1665,6 +1727,8 @@ START_TEST(bcrypt)
@@ -1392,6 +1454,8 @@ START_TEST(bcrypt)
pBCryptDestroyKey = (void *)GetProcAddress(module, "BCryptDestroyKey");
pBCryptImportKey = (void *)GetProcAddress(module, "BCryptImportKey");
pBCryptExportKey = (void *)GetProcAddress(module, "BCryptExportKey");
@ -96,7 +96,7 @@ index ae48914b5de..be901202970 100644
test_BCryptGenRandom();
test_BCryptGetFipsAlgorithmMode();
@@ -1679,6 +1743,7 @@ START_TEST(bcrypt)
@@ -1402,6 +1466,7 @@ START_TEST(bcrypt)
test_BCryptEncrypt();
test_BCryptDecrypt();
test_key_import_export();
@ -105,5 +105,5 @@ index ae48914b5de..be901202970 100644
if (pBCryptHash) /* >= Win 10 */
test_BcryptHash();
--
2.14.1
1.9.1

View File

@ -1,4 +1,4 @@
From 4547f7d3d18783e30d955c6ec236b3b1945e8155 Mon Sep 17 00:00:00 2001
From 7b164e4ffcf6cc466540bd348afa55d2c0bcf611 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 29 Sep 2017 19:18:58 +0200
Subject: [PATCH] bcrypt: Implement importing of ecdsa keys.
@ -33,7 +33,7 @@ index 28c2394..78824d7 100644
@ stub GetCipherInterface
@ stub GetHashInterface
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 0eca8e6..5381d9c 100644
index 1d5d873..18976aa 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -219,7 +219,9 @@ enum alg_id
@ -148,7 +148,7 @@ index 0eca8e6..5381d9c 100644
HeapFree( GetProcessHeap(), 0, key );
return STATUS_SUCCESS;
}
@@ -1291,6 +1341,12 @@ static NTSTATUS key_symmetric_init( struct key *key, struct algorithm *alg, UCHA
@@ -1292,6 +1342,12 @@ static NTSTATUS key_symmetric_init( struct key *key, struct algorithm *alg, UCHA
return STATUS_NOT_IMPLEMENTED;
}
@ -160,8 +160,8 @@ index 0eca8e6..5381d9c 100644
+
static NTSTATUS key_duplicate( struct key *key_orig, struct key *key_copy )
{
ERR( "support for keys not available at build time\n" );
@@ -1513,6 +1569,88 @@ NTSTATUS WINAPI BCryptExportKey( BCRYPT_KEY_HANDLE export_key, BCRYPT_KEY_HANDLE
ERR( "support for keys not available at build time\n" );
@@ -1514,6 +1570,88 @@ NTSTATUS WINAPI BCryptExportKey( BCRYPT_KEY_HANDLE export_key, BCRYPT_KEY_HANDLE
return STATUS_INVALID_PARAMETER;
}
@ -251,10 +251,10 @@ index 0eca8e6..5381d9c 100644
{
struct key *key = handle;
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index 1e4c2bc..678b5c1 100644
index 699d6aa..fe57274 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -1395,7 +1395,7 @@ static void test_ECDSA(void)
@@ -1399,7 +1399,7 @@ static void test_ECDSA(void)
status = pBCryptOpenAlgorithmProvider(&alg, BCRYPT_ECDSA_P256_ALGORITHM, NULL, 0);
if (status)
{
@ -263,7 +263,7 @@ index 1e4c2bc..678b5c1 100644
return;
}
@@ -1411,10 +1411,10 @@ static void test_ECDSA(void)
@@ -1415,10 +1415,10 @@ static void test_ECDSA(void)
ok(!status, "BCryptImportKeyPair failed: %08x\n", status);
status = pBCryptVerifySignature(key, NULL, certHash, sizeof(certHash) - 1, certSignature, sizeof(certSignature), 0);

View File

@ -1,4 +1,4 @@
From 64ad33508c5d3cfc3dcb40987b060cba2889d41d Mon Sep 17 00:00:00 2001
From 0a88b987dc3a1293f0ca94b661cc96653abfe132 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 29 Sep 2017 20:31:00 +0200
Subject: [PATCH] bcrypt: Implement BCryptVerifySignature for ecdsa signatures.
@ -9,7 +9,7 @@ Subject: [PATCH] bcrypt: Implement BCryptVerifySignature for ecdsa signatures.
2 files changed, 326 insertions(+), 4 deletions(-)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 5381d9c..16bff9d 100644
index 18976aa..d6e6bb7 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -27,6 +27,7 @@
@ -384,7 +384,7 @@ index 5381d9c..16bff9d 100644
static NTSTATUS key_destroy( struct key *key )
{
if (key_is_symmetric(key))
@@ -1409,6 +1723,13 @@ static NTSTATUS key_symmetric_get_secret( struct key *key, UCHAR **secret, ULONG
@@ -1410,6 +1724,13 @@ static NTSTATUS key_symmetric_get_secret( struct key *key, UCHAR **secret, ULONG
return STATUS_NOT_IMPLEMENTED;
}
@ -398,7 +398,7 @@ index 5381d9c..16bff9d 100644
static NTSTATUS key_destroy( struct key *key )
{
ERR( "support for keys not available at build time\n" );
@@ -1642,13 +1963,14 @@ NTSTATUS WINAPI BCryptVerifySignature( BCRYPT_KEY_HANDLE handle, void *padding,
@@ -1643,13 +1964,14 @@ NTSTATUS WINAPI BCryptVerifySignature( BCRYPT_KEY_HANDLE handle, void *padding,
{
struct key *key = handle;
@ -416,10 +416,10 @@ index 5381d9c..16bff9d 100644
NTSTATUS WINAPI BCryptDestroyKey( BCRYPT_KEY_HANDLE handle )
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index 678b5c1..0694a0f 100644
index fe57274..d42eb7c 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -1411,10 +1411,10 @@ static void test_ECDSA(void)
@@ -1415,10 +1415,10 @@ static void test_ECDSA(void)
ok(!status, "BCryptImportKeyPair failed: %08x\n", status);
status = pBCryptVerifySignature(key, NULL, certHash, sizeof(certHash) - 1, certSignature, sizeof(certSignature), 0);

View File

@ -1,4 +1,4 @@
From 7955372efe4eb048ac77fabd17b99807866f06c3 Mon Sep 17 00:00:00 2001
From 32fc25b7b03ff15fca7693aae94d206994fcf036 Mon Sep 17 00:00:00 2001
From: Kimmo Myllyvirta <kimmo.myllyvirta@gmail.com>
Date: Tue, 10 Oct 2017 16:40:41 +0300
Subject: [PATCH] bcrypt: Initial implementation for RSA key import and
@ -10,7 +10,7 @@ Subject: [PATCH] bcrypt: Initial implementation for RSA key import and
2 files changed, 135 insertions(+), 10 deletions(-)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 16bff9d..07684b8 100644
index d6e6bb7..52e1ae0 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -71,6 +71,9 @@ static int (*pgnutls_pubkey_verify_hash2)(gnutls_pubkey_t key, gnutls_sign_algor
@ -215,7 +215,7 @@ index 16bff9d..07684b8 100644
pgnutls_pubkey_deinit( gnutls_key );
return (ret < 0) ? STATUS_INVALID_SIGNATURE : STATUS_SUCCESS;
}
@@ -1953,6 +2034,33 @@ NTSTATUS WINAPI BCryptImportKeyPair( BCRYPT_ALG_HANDLE algorithm, BCRYPT_KEY_HAN
@@ -1954,6 +2035,33 @@ NTSTATUS WINAPI BCryptImportKeyPair( BCRYPT_ALG_HANDLE algorithm, BCRYPT_KEY_HAN
*ret_key = key;
return STATUS_SUCCESS;
}

View File

@ -1,7 +1,7 @@
From 1ac61b565db2204b247603ee7ad1124ad79bf50f Mon Sep 17 00:00:00 2001
From c5480fb4f71d093e22c5ac9149a08879c66c14ee Mon Sep 17 00:00:00 2001
From: Kimmo Myllyvirta <kimmo.myllyvirta@gmail.com>
Date: Tue, 10 Oct 2017 16:41:09 +0300
Subject: bcrypt/tests: Add simple test for RSA.
Subject: [PATCH] bcrypt/tests: Add simple test for RSA.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@ -12,10 +12,10 @@ Based on patch from Bernhard Übelacker.
1 file changed, 95 insertions(+)
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index 73bd4d69a5b..56e3440b545 100644
index d42eb7c..0b27fce 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -1697,6 +1697,100 @@ static void test_ECDSA(void)
@@ -1424,6 +1424,100 @@ static void test_ECDSA(void)
pBCryptCloseAlgorithmProvider(alg, 0);
}
@ -116,7 +116,7 @@ index 73bd4d69a5b..56e3440b545 100644
START_TEST(bcrypt)
{
HMODULE module;
@@ -1744,6 +1838,7 @@ START_TEST(bcrypt)
@@ -1467,6 +1561,7 @@ START_TEST(bcrypt)
test_BCryptDecrypt();
test_key_import_export();
test_ECDSA();
@ -125,5 +125,5 @@ index 73bd4d69a5b..56e3440b545 100644
if (pBCryptHash) /* >= Win 10 */
test_BcryptHash();
--
2.14.1
1.9.1

View File

@ -1,17 +1,17 @@
From 3714e6bcd413355a60a691d38f487f321be93b2a Mon Sep 17 00:00:00 2001
From cc01dabd2ec09d12972e7ce95a2894c39af4d8e9 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 14 Oct 2017 22:44:13 +0200
Subject: bcrypt: Store full ECCKEY_BLOB struct in BCryptImportKeyPair.
Subject: [PATCH] bcrypt: Store full ECCKEY_BLOB struct in BCryptImportKeyPair.
---
dlls/bcrypt/bcrypt_main.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 3356364a6dc..2aecfb9a227 100644
index 52e1ae0..a7f8fc4 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -1308,6 +1308,7 @@ static void buffer_append_asn1_r_s( struct buffer *buffer, BYTE *r, DWORD r_len,
@@ -1379,6 +1379,7 @@ static void buffer_append_asn1_r_s( struct buffer *buffer, BYTE *r, DWORD r_len,
static NTSTATUS import_gnutls_pubkey_ecc( struct key *key, gnutls_pubkey_t *gnutls_key )
{
@ -19,7 +19,7 @@ index 3356364a6dc..2aecfb9a227 100644
gnutls_ecc_curve_t curve;
gnutls_datum_t x, y;
int ret;
@@ -1328,10 +1329,11 @@ static NTSTATUS import_gnutls_pubkey_ecc( struct key *key, gnutls_pubkey_t *gnut
@@ -1399,10 +1400,11 @@ static NTSTATUS import_gnutls_pubkey_ecc( struct key *key, gnutls_pubkey_t *gnut
return STATUS_INTERNAL_ERROR;
}
@ -35,7 +35,7 @@ index 3356364a6dc..2aecfb9a227 100644
if ((ret = pgnutls_pubkey_import_ecc_raw( *gnutls_key, curve, &x, &y )))
{
@@ -1846,7 +1848,7 @@ NTSTATUS WINAPI BCryptImportKeyPair( BCRYPT_ALG_HANDLE algorithm, BCRYPT_KEY_HAN
@@ -2026,7 +2028,7 @@ NTSTATUS WINAPI BCryptImportKeyPair( BCRYPT_ALG_HANDLE algorithm, BCRYPT_KEY_HAN
return STATUS_NO_MEMORY;
key->hdr.magic = MAGIC_KEY;
@ -45,5 +45,5 @@ index 3356364a6dc..2aecfb9a227 100644
HeapFree( GetProcessHeap(), 0, key );
return status;
--
2.14.1
1.9.1

View File

@ -1,7 +1,7 @@
From d539d3ee4905500fc71d03a6297ffc81a8f342f2 Mon Sep 17 00:00:00 2001
From 42e7bd210fe641367962b04f5d8b3df4c09c2818 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 19 Aug 2014 22:47:51 +0200
Subject: [PATCH] dxgi: Improve stubs for MakeWindowAssociation and
Subject: [PATCH 314/358] dxgi: Improve stubs for MakeWindowAssociation and
GetWindowAssociation.
---
@ -10,7 +10,7 @@ Subject: [PATCH] dxgi: Improve stubs for MakeWindowAssociation and
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/dlls/dxgi/dxgi_private.h b/dlls/dxgi/dxgi_private.h
index ed79ca2..15fa9a3 100644
index 24487c3..9c5cfcc 100644
--- a/dlls/dxgi/dxgi_private.h
+++ b/dlls/dxgi/dxgi_private.h
@@ -113,6 +113,7 @@ struct dxgi_factory
@ -22,12 +22,12 @@ index ed79ca2..15fa9a3 100644
HRESULT dxgi_factory_create(REFIID riid, void **factory, BOOL extended) DECLSPEC_HIDDEN;
diff --git a/dlls/dxgi/factory.c b/dlls/dxgi/factory.c
index 50b7941..031c555 100644
index 7fc3279..d983928 100644
--- a/dlls/dxgi/factory.c
+++ b/dlls/dxgi/factory.c
@@ -172,16 +172,29 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_EnumAdapters(IDXGIFactory4 *iface,
static HRESULT STDMETHODCALLTYPE dxgi_factory_MakeWindowAssociation(IDXGIFactory4 *iface, HWND window, UINT flags)
@@ -174,16 +174,29 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_EnumAdapters(IWineDXGIFactory *ifa
static HRESULT STDMETHODCALLTYPE dxgi_factory_MakeWindowAssociation(IWineDXGIFactory *iface,
HWND window, UINT flags)
{
+ struct dxgi_factory *factory = impl_from_IDXGIFactory1(iface);
+
@ -41,7 +41,7 @@ index 50b7941..031c555 100644
return S_OK;
}
static HRESULT STDMETHODCALLTYPE dxgi_factory_GetWindowAssociation(IDXGIFactory4 *iface, HWND *window)
static HRESULT STDMETHODCALLTYPE dxgi_factory_GetWindowAssociation(IWineDXGIFactory *iface, HWND *window)
{
+ struct dxgi_factory *factory = impl_from_IDXGIFactory1(iface);
+
@ -55,7 +55,7 @@ index 50b7941..031c555 100644
+ return S_OK;
}
static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChain(IDXGIFactory4 *iface,
static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChain(IWineDXGIFactory *iface,
--
1.9.1

View File

@ -1,7 +1,7 @@
From 1db0b7784f49f336ba7243fde42f5ff67eb67fa8 Mon Sep 17 00:00:00 2001
From 122f1f6cc4feb329eead34eb25e7739bdef899fc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 5 Sep 2016 15:31:29 +0200
Subject: inseng: Implement CIF reader and download functions.
Subject: [PATCH] inseng: Implement CIF reader and download functions.
FIXME: Needs splitting.
---
@ -9,16 +9,16 @@ FIXME: Needs splitting.
dlls/inseng/icif.c | 1745 ++++++++++++++++++++++++++++++++++++++++++
dlls/inseng/inf.c | 443 +++++++++++
dlls/inseng/inseng.spec | 4 +-
dlls/inseng/inseng_main.c | 997 ++++++++++++++++++++++--
dlls/inseng/inseng_main.c | 989 +++++++++++++++++++++++-
dlls/inseng/inseng_private.h | 93 +++
include/inseng.idl | 276 ++++++-
7 files changed, 3504 insertions(+), 61 deletions(-)
7 files changed, 3504 insertions(+), 53 deletions(-)
create mode 100644 dlls/inseng/icif.c
create mode 100644 dlls/inseng/inf.c
create mode 100644 dlls/inseng/inseng_private.h
diff --git a/dlls/inseng/Makefile.in b/dlls/inseng/Makefile.in
index 652e06b0f25..d0aaa663b08 100644
index 652e06b..d0aaa66 100644
--- a/dlls/inseng/Makefile.in
+++ b/dlls/inseng/Makefile.in
@@ -1,6 +1,9 @@
@ -35,7 +35,7 @@ index 652e06b0f25..d0aaa663b08 100644
IDL_SRCS = inseng_classes.idl
diff --git a/dlls/inseng/icif.c b/dlls/inseng/icif.c
new file mode 100644
index 00000000000..177f1b892ce
index 0000000..177f1b8
--- /dev/null
+++ b/dlls/inseng/icif.c
@@ -0,0 +1,1745 @@
@ -1786,7 +1786,7 @@ index 00000000000..177f1b892ce
+}
diff --git a/dlls/inseng/inf.c b/dlls/inseng/inf.c
new file mode 100644
index 00000000000..4e164cc7b85
index 0000000..4e164cc
--- /dev/null
+++ b/dlls/inseng/inf.c
@@ -0,0 +1,443 @@
@ -2234,7 +2234,7 @@ index 00000000000..4e164cc7b85
+ return hr;
+}
diff --git a/dlls/inseng/inseng.spec b/dlls/inseng/inseng.spec
index 82c0b4d5fe1..7ae46fad3a7 100644
index 82c0b4d..7ae46fa 100644
--- a/dlls/inseng/inseng.spec
+++ b/dlls/inseng/inseng.spec
@@ -7,6 +7,6 @@
@ -2247,7 +2247,7 @@ index 82c0b4d5fe1..7ae46fad3a7 100644
+@ stdcall GetICifRWFileFromFile(ptr str)
@ stub PurgeDownloadDirectory
diff --git a/dlls/inseng/inseng_main.c b/dlls/inseng/inseng_main.c
index c95d2c73216..7b1e763f2ff 100644
index 93649e2..ecbd229 100644
--- a/dlls/inseng/inseng_main.c
+++ b/dlls/inseng/inseng_main.c
@@ -2,6 +2,7 @@
@ -2258,7 +2258,7 @@ index c95d2c73216..7b1e763f2ff 100644
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -29,35 +30,323 @@
@@ -29,9 +30,13 @@
#include "winuser.h"
#include "ole2.h"
#include "rpcproxy.h"
@ -2270,32 +2270,24 @@ index c95d2c73216..7b1e763f2ff 100644
+#include "inseng_private.h"
+
#include "wine/debug.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL(inseng);
@@ -39,9 +44,38 @@ WINE_DEFAULT_DEBUG_CHANNEL(inseng);
static HINSTANCE instance;
-static inline void* __WINE_ALLOC_SIZE(1) heap_alloc(size_t size)
+static HINSTANCE instance;
+
+enum thread_operation
{
- return HeapAlloc(GetProcessHeap(), 0, size);
-}
+{
+ OP_DOWNLOAD,
+ OP_INSTALL
+};
-static inline BOOL heap_free(void *mem)
+
+struct thread_info
{
- return HeapFree(GetProcessHeap(), 0, mem);
-}
+{
+ DWORD operation;
+ DWORD jobflags;
-static HINSTANCE instance;
+ IEnumCifComponents *enum_comp;
-struct InstallEngine {
+
+ DWORD download_size;
+ DWORD install_size;
+
@ -2303,8 +2295,7 @@ index c95d2c73216..7b1e763f2ff 100644
+ ULONGLONG download_start;
+};
+
+struct InstallEngine
+{
struct InstallEngine {
IInstallEngine2 IInstallEngine2_iface;
+ IInstallEngineTiming IInstallEngineTiming_iface;
LONG ref;
@ -2319,6 +2310,21 @@ index c95d2c73216..7b1e763f2ff 100644
+ struct thread_info thread;
};
static inline InstallEngine *impl_from_IInstallEngine2(IInstallEngine2 *iface)
@@ -49,6 +83,269 @@ static inline InstallEngine *impl_from_IInstallEngine2(IInstallEngine2 *iface)
return CONTAINING_RECORD(iface, InstallEngine, IInstallEngine2_iface);
}
+static inline struct downloadcb *impl_from_IBindStatusCallback(IBindStatusCallback *iface)
+{
+ return CONTAINING_RECORD(iface, struct downloadcb, IBindStatusCallback_iface);
+}
+
+static inline InstallEngine *impl_from_IInstallEngineTiming(IInstallEngineTiming *iface)
+{
+ return CONTAINING_RECORD(iface, InstallEngine, IInstallEngineTiming_iface);
+}
+
+struct downloadcb
+{
+ IBindStatusCallback IBindStatusCallback_iface;
@ -2338,21 +2344,6 @@ index c95d2c73216..7b1e763f2ff 100644
+ HRESULT hr;
+};
+
+static inline struct downloadcb *impl_from_IBindStatusCallback(IBindStatusCallback *iface)
+{
+ return CONTAINING_RECORD(iface, struct downloadcb, IBindStatusCallback_iface);
+}
+
static inline InstallEngine *impl_from_IInstallEngine2(IInstallEngine2 *iface)
{
return CONTAINING_RECORD(iface, InstallEngine, IInstallEngine2_iface);
}
+static inline InstallEngine *impl_from_IInstallEngineTiming(IInstallEngineTiming *iface)
+{
+ return CONTAINING_RECORD(iface, InstallEngine, IInstallEngineTiming_iface);
+}
+
+static HRESULT WINAPI downloadcb_QueryInterface(IBindStatusCallback *iface, REFIID riid, void **ppv)
+{
+ struct downloadcb *This = impl_from_IBindStatusCallback(iface);
@ -2450,7 +2441,7 @@ index c95d2c73216..7b1e763f2ff 100644
+ /* fall-through */
+ case BINDSTATUS_DOWNLOADINGDATA:
+ case BINDSTATUS_ENDDOWNLOADDATA:
+ This->engine->thread.downloaded_kb = This->dl_previous_kb + progress / 1024;
+ This->engine->thread.downloaded_kb = This->dl_previous_kb progress / 1024;
+ if (This->engine->callback)
+ {
+ hr = IInstallEngineCallback_OnComponentProgress(This->engine->callback,
@ -2590,7 +2581,7 @@ index c95d2c73216..7b1e763f2ff 100644
static HRESULT WINAPI InstallEngine_QueryInterface(IInstallEngine2 *iface, REFIID riid, void **ppv)
{
InstallEngine *This = impl_from_IInstallEngine2(iface);
@@ -71,13 +360,16 @@ static HRESULT WINAPI InstallEngine_QueryInterface(IInstallEngine2 *iface, REFII
@@ -62,13 +359,16 @@ static HRESULT WINAPI InstallEngine_QueryInterface(IInstallEngine2 *iface, REFII
}else if(IsEqualGUID(&IID_IInstallEngine2, riid)) {
TRACE("(%p)->(IID_IInstallEngine2 %p)\n", This, ppv);
*ppv = &This->IInstallEngine2_iface;
@ -2609,7 +2600,7 @@ index c95d2c73216..7b1e763f2ff 100644
return S_OK;
}
@@ -98,181 +390,726 @@ static ULONG WINAPI InstallEngine_Release(IInstallEngine2 *iface)
@@ -89,181 +389,726 @@ static ULONG WINAPI InstallEngine_Release(IInstallEngine2 *iface)
TRACE("(%p) ref=%d\n", This, ref);
@ -2655,10 +2646,10 @@ index c95d2c73216..7b1e763f2ff 100644
+
+ /* FIXME: handle install options and find out the default options*/
+ if (operation == OP_DOWNLOAD && ICifComponent_IsComponentDownloaded(comp) == S_FALSE)
+ download += ICifComponent_GetDownloadSize(comp);
+ download = ICifComponent_GetDownloadSize(comp);
+ /*
+ if (operation == OP_INSTALL && ICifComponent_IsComponentInstalled(comp) == S_FALSE)
+ install += ICifComponent_GetInstalledSize(comp);
+ install = ICifComponent_GetInstalledSize(comp);
+ */
+ }
+
@ -2737,7 +2728,7 @@ index c95d2c73216..7b1e763f2ff 100644
+ int len_url = strlen(url);
+ char *combined;
+
+ combined = heap_alloc(len_base + len_url + 2);
+ combined = heap_alloc(len_base len_url 2);
+ if (!combined) return NULL;
+
+ strcpy(combined, baseurl);
@ -2779,7 +2770,7 @@ index c95d2c73216..7b1e763f2ff 100644
+
+static char *merge_path(char *path1, char *path2)
+{
+ int len = strlen(path1) + strlen(path2) + 2;
+ int len = strlen(path1) strlen(path2) 2;
+ char *combined = heap_alloc(len);
+
+ if (!combined) return NULL;
@ -2862,12 +2853,12 @@ index c95d2c73216..7b1e763f2ff 100644
+
+static HRESULT process_component_dependencies(InstallEngine *This, ICifComponent *comp)
+{
+ char id[MAX_ID_LENGTH+1], type;
+ char id[MAX_ID_LENGTH1], type;
+ DWORD ver, build;
+ HRESULT hr;
+ int i;
+
+ for (i = 0;; i++)
+ for (i = 0;; i)
+ {
+ hr = ICifComponent_GetDependency(comp, i, id, sizeof(id), &type, &ver, &build);
+ if (SUCCEEDED(hr))
@ -2882,8 +2873,8 @@ index c95d2c73216..7b1e763f2ff 100644
+static HRESULT process_component(InstallEngine *This, ICifComponent *comp)
+{
+ DWORD size_dl, size_install, phase;
+ char display[MAX_DISPLAYNAME_LENGTH+1];
+ char id[MAX_ID_LENGTH+1];
+ char display[MAX_DISPLAYNAME_LENGTH1];
+ char id[MAX_ID_LENGTH1];
+ HRESULT hr;
+ int i;
+
@ -2910,7 +2901,7 @@ index c95d2c73216..7b1e763f2ff 100644
+
+ if (This->thread.operation == OP_DOWNLOAD)
+ {
+ for (i = 0;; i++)
+ for (i = 0;; i)
+ {
+ DWORD flags;
+ char *url;
@ -3121,7 +3112,7 @@ index c95d2c73216..7b1e763f2ff 100644
+ if (index == 0)
+ {
+ char *id_src = component_get_id(comp);
+ *id = CoTaskMemAlloc(strlen(id_src) + 1);
+ *id = CoTaskMemAlloc(strlen(id_src) 1);
+
+ if (*id)
+ strcpy(*id, id_src);
@ -3372,7 +3363,7 @@ index c95d2c73216..7b1e763f2ff 100644
InstallEngine_QueryInterface,
InstallEngine_AddRef,
InstallEngine_Release,
@@ -302,6 +1139,70 @@ static const IInstallEngine2Vtbl InstallEngine2Vtbl = {
@@ -293,6 +1138,70 @@ static const IInstallEngine2Vtbl InstallEngine2Vtbl = {
InstallEngine2_GetICifFile
};
@ -3412,7 +3403,7 @@ index c95d2c73216..7b1e763f2ff 100644
+ ULONGLONG elapsed;
+ static int once;
+
+ if (!once++)
+ if (!once)
+ FIXME("(%p)->(%p): semi-stub\n", This, progress);
+ else
+ TRACE("(%p)->(%p): semi-stub\n", This, progress);
@ -3443,7 +3434,7 @@ index c95d2c73216..7b1e763f2ff 100644
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
{
*ppv = NULL;
@@ -346,12 +1247,14 @@ static HRESULT WINAPI InstallEngineCF_CreateInstance(IClassFactory *iface, IUnkn
@@ -337,12 +1246,14 @@ static HRESULT WINAPI InstallEngineCF_CreateInstance(IClassFactory *iface, IUnkn
TRACE("(%p %s %p)\n", outer, debugstr_guid(riid), ppv);
@ -3461,7 +3452,7 @@ index c95d2c73216..7b1e763f2ff 100644
IInstallEngine2_Release(&engine->IInstallEngine2_iface);
diff --git a/dlls/inseng/inseng_private.h b/dlls/inseng/inseng_private.h
new file mode 100644
index 00000000000..1e739d22128
index 0000000..1e739d2
--- /dev/null
+++ b/dlls/inseng/inseng_private.h
@@ -0,0 +1,93 @@
@ -3559,7 +3550,7 @@ index 00000000000..1e739d22128
+void component_set_installed(ICifComponent *iface, BOOL value) DECLSPEC_HIDDEN;
+ char *component_get_id(ICifComponent *iface) DECLSPEC_HIDDEN;
diff --git a/include/inseng.idl b/include/inseng.idl
index 8a3f4c4d270..82927418a99 100644
index 8a3f4c4..8292741 100644
--- a/include/inseng.idl
+++ b/include/inseng.idl
@@ -1,5 +1,6 @@
@ -3885,5 +3876,5 @@ index 8a3f4c4d270..82927418a99 100644
+cpp_quote("HRESULT WINAPI GetICifFileFromFile(ICifFile **, const char *);")
+cpp_quote("HRESULT WINAPI GetICifRWFileFromFile(ICifRWFile **, const char *);")
--
2.11.0
1.9.1

View File

@ -1,102 +0,0 @@
From 07f489ad42fce6f8baa1bc06733c106946857123 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 25 Jun 2017 14:58:23 +0200
Subject: kernel32: Add detection for position independent executables.
---
dlls/kernel32/module.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 59 insertions(+), 2 deletions(-)
diff --git a/dlls/kernel32/module.c b/dlls/kernel32/module.c
index badfe1d175b..d5314309926 100644
--- a/dlls/kernel32/module.c
+++ b/dlls/kernel32/module.c
@@ -238,13 +238,29 @@ void MODULE_get_binary_info( HANDLE hfile, struct binary_info *info )
unsigned char magic[4];
unsigned char class;
unsigned char data;
- unsigned char version;
- unsigned char ignored[9];
+ unsigned char ignored1[10];
unsigned short type;
unsigned short machine;
+ unsigned char ignored2[8];
+ unsigned int phoff;
+ unsigned char ignored3[12];
+ unsigned short phnum;
} elf;
struct
{
+ unsigned char magic[4];
+ unsigned char class;
+ unsigned char data;
+ unsigned char ignored1[10];
+ unsigned short type;
+ unsigned short machine;
+ unsigned char ignored2[12];
+ unsigned long long phoff;
+ unsigned char ignored3[16];
+ unsigned short phnum;
+ } elf64;
+ struct
+ {
unsigned int magic;
unsigned int cputype;
unsigned int cpusubtype;
@@ -272,12 +288,53 @@ void MODULE_get_binary_info( HANDLE hfile, struct binary_info *info )
{
header.elf.type = RtlUshortByteSwap( header.elf.type );
header.elf.machine = RtlUshortByteSwap( header.elf.machine );
+ if (header.elf.class == 2)
+ {
+ header.elf64.phoff = RtlUlonglongByteSwap( header.elf64.phoff );
+ header.elf64.phnum = RtlUshortByteSwap( header.elf64.phnum );
+ }
+ else
+ {
+ header.elf.phoff = RtlUlongByteSwap( header.elf.phoff );
+ header.elf.phnum = RtlUshortByteSwap( header.elf.phnum );
+ }
}
switch(header.elf.type)
{
case 2: info->type = BINARY_UNIX_EXE; break;
case 3: info->type = BINARY_UNIX_LIB; break;
}
+ if (header.elf.type == 3)
+ {
+ unsigned long long phoff;
+ unsigned short phnum;
+ unsigned int type;
+ if (header.elf.class == 2)
+ {
+ phoff = header.elf64.phoff;
+ phnum = header.elf64.phnum;
+ }
+ else
+ {
+ phoff = header.elf.phoff;
+ phnum = header.elf.phnum;
+ }
+ while (phnum--)
+ {
+ if (SetFilePointer( hfile, phoff, NULL, SEEK_SET ) == -1) return;
+ if (!ReadFile( hfile, &type, sizeof(type), &len, NULL ) || len < sizeof(type)) return;
+#ifdef WORDS_BIGENDIAN
+ if (header.elf.data == 1)
+#else
+ if (header.elf.data == 2)
+#endif
+ {
+ type = RtlUlongByteSwap( type );
+ }
+ if (type == 3) info->type = BINARY_UNIX_EXE;
+ phoff += (header.elf.class == 2) ? 56 : 32;
+ }
+ }
switch(header.elf.machine)
{
case 3: info->arch = IMAGE_FILE_MACHINE_I386; break;
--
2.13.1

View File

@ -1 +0,0 @@
Fixes: [43217] Implement detection for position-independent executables

View File

@ -1,7 +1,7 @@
From 003af598b273d00e79add3fae33aa6e3d008d93f Mon Sep 17 00:00:00 2001
From 25b0ee6993d4a790a2acf8f90ee8bc9dc261fce8 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Mon, 2 Jan 2017 15:34:21 +0800
Subject: server: All fields up to CheckSum are mandatory regardless of
Subject: [PATCH] server: All fields up to CheckSum are mandatory regardless of
SizeOfOptionalHeader value.
---
@ -9,10 +9,10 @@ Subject: server: All fields up to CheckSum are mandatory regardless of
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/server/mapping.c b/server/mapping.c
index 7fce12f953d..44fbe637933 100644
index 1ed8c9d..ce0bf52 100644
--- a/server/mapping.c
+++ b/server/mapping.c
@@ -470,11 +470,10 @@ static unsigned int get_image_params( struct mapping *mapping, file_pos_t file_s
@@ -580,11 +580,10 @@ static unsigned int get_image_params( struct mapping *mapping, file_pos_t file_s
if (dos.e_magic != IMAGE_DOS_SIGNATURE) return STATUS_INVALID_IMAGE_NOT_MZ;
pos = dos.e_lfanew;
@ -26,7 +26,7 @@ index 7fce12f953d..44fbe637933 100644
if (nt.Signature != IMAGE_NT_SIGNATURE)
{
if (*(WORD *)&nt.Signature == IMAGE_OS2_SIGNATURE) return STATUS_INVALID_IMAGE_NE_FORMAT;
@@ -513,6 +512,10 @@ static unsigned int get_image_params( struct mapping *mapping, file_pos_t file_s
@@ -594,6 +593,10 @@ static unsigned int get_image_params( struct mapping *mapping, file_pos_t file_s
switch (nt.opt.hdr32.Magic)
{
case IMAGE_NT_OPTIONAL_HDR32_MAGIC:
@ -34,20 +34,20 @@ index 7fce12f953d..44fbe637933 100644
+ size = max( nt.FileHeader.SizeOfOptionalHeader, offsetof(IMAGE_OPTIONAL_HEADER32, CheckSum) );
+ if (size < sizeof(nt.opt.hdr32)) memset( (char *)&nt.opt.hdr32 + size, 0, sizeof(nt.opt.hdr32) - size );
+
mapping->image.base = nt.opt.hdr32.ImageBase;
mapping->image.entry_point = nt.opt.hdr32.ImageBase + nt.opt.hdr32.AddressOfEntryPoint;
mapping->image.map_size = ROUND_SIZE( nt.opt.hdr32.SizeOfImage );
@@ -527,6 +530,10 @@ static unsigned int get_image_params( struct mapping *mapping, file_pos_t file_s
mapping->image.checksum = nt.opt.hdr32.CheckSum;
switch (nt.FileHeader.Machine)
{
case IMAGE_FILE_MACHINE_I386:
@@ -636,6 +639,10 @@ static unsigned int get_image_params( struct mapping *mapping, file_pos_t file_s
break;
case IMAGE_NT_OPTIONAL_HDR64_MAGIC:
+ /* All fields up to CheckSum are mandatory regardless of SizeOfOptionalHeader value */
+ size = max( nt.FileHeader.SizeOfOptionalHeader, offsetof(IMAGE_OPTIONAL_HEADER64, CheckSum) );
+ if (size < sizeof(nt.opt.hdr64)) memset( (char *)&nt.opt.hdr64 + size, 0, sizeof(nt.opt.hdr64) - size );
+
mapping->image.base = nt.opt.hdr64.ImageBase;
mapping->image.entry_point = nt.opt.hdr64.ImageBase + nt.opt.hdr64.AddressOfEntryPoint;
mapping->image.map_size = ROUND_SIZE( nt.opt.hdr64.SizeOfImage );
if (!(cpu_mask & CPU_64BIT_MASK)) return STATUS_INVALID_IMAGE_WIN_64;
switch (nt.FileHeader.Machine)
{
--
2.11.0
1.9.1

View File

@ -1,18 +1,18 @@
From dab3d678b587d38bc2701763d7f20ee563a3dc16 Mon Sep 17 00:00:00 2001
From 9b16cb2d6cd6a9e12819ea88e71d679ef5bbdc10 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Mon, 2 Jan 2017 15:50:01 +0800
Subject: kernel32/tests: Add a PE test image that resembles format of some of
8k demos.
Subject: [PATCH] kernel32/tests: Add a PE test image that resembles format of
some of 8k demos.
---
dlls/kernel32/tests/loader.c | 39 +++++++++++++++++++++++++++++++++++++--
1 file changed, 37 insertions(+), 2 deletions(-)
dlls/kernel32/tests/loader.c | 40 ++++++++++++++++++++++++++++++++++++++--
1 file changed, 38 insertions(+), 2 deletions(-)
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
index 91a6ff05161..3890d3ba3f3 100644
index 25d3bf5..5efa0d6 100644
--- a/dlls/kernel32/tests/loader.c
+++ b/dlls/kernel32/tests/loader.c
@@ -184,7 +184,7 @@ static DWORD create_test_dll( const IMAGE_DOS_HEADER *dos_header, UINT dos_size,
@@ -193,7 +193,7 @@ static DWORD create_test_dll( const IMAGE_DOS_HEADER *dos_header, UINT dos_size,
{
SetLastError(0xdeadbeef);
ret = WriteFile(hfile, &nt_header->OptionalHeader,
@ -21,7 +21,7 @@ index 91a6ff05161..3890d3ba3f3 100644
&dummy, NULL);
ok(ret, "WriteFile error %d\n", GetLastError());
if (nt_header->FileHeader.SizeOfOptionalHeader > sizeof(IMAGE_OPTIONAL_HEADER))
@@ -200,6 +200,8 @@ static DWORD create_test_dll( const IMAGE_DOS_HEADER *dos_header, UINT dos_size,
@@ -209,6 +209,8 @@ static DWORD create_test_dll( const IMAGE_DOS_HEADER *dos_header, UINT dos_size,
assert(nt_header->FileHeader.NumberOfSections <= 1);
if (nt_header->FileHeader.NumberOfSections)
{
@ -30,7 +30,7 @@ index 91a6ff05161..3890d3ba3f3 100644
section.SizeOfRawData = 10;
if (nt_header->OptionalHeader.SectionAlignment >= page_size)
@@ -224,6 +226,17 @@ static DWORD create_test_dll( const IMAGE_DOS_HEADER *dos_header, UINT dos_size,
@@ -233,6 +235,17 @@ static DWORD create_test_dll( const IMAGE_DOS_HEADER *dos_header, UINT dos_size,
ret = WriteFile(hfile, section_data, sizeof(section_data), &dummy, NULL);
ok(ret, "WriteFile error %d\n", GetLastError());
}
@ -48,17 +48,17 @@ index 91a6ff05161..3890d3ba3f3 100644
size = GetFileSize(hfile, NULL);
CloseHandle(hfile);
return size;
@@ -294,7 +307,8 @@ static void query_image_section( int id, const char *dll_name, const IMAGE_NT_HE
image.LoaderFlags, nt_header->OptionalHeader.LoaderFlags );
@@ -382,7 +395,8 @@ static BOOL query_image_section( int id, const char *dll_name, const IMAGE_NT_HE
ok( image.LoaderFlags == (cor_header != NULL), "%u: LoaderFlags wrong %08x\n", id, image.LoaderFlags );
ok( image.ImageFileSize == file_size || broken(!image.ImageFileSize), /* winxpsp1 */
"%u: ImageFileSize wrong %08x / %08x\n", id, image.ImageFileSize, file_size );
- ok( image.CheckSum == nt_header->OptionalHeader.CheckSum, "%u: CheckSum wrong %08x / %08x\n", id,
+ ok( image.CheckSum == nt_header->OptionalHeader.CheckSum || broken(truncated),
+ "%u: CheckSum wrong %08x / %08x\n", id,
image.CheckSum, nt_header->OptionalHeader.CheckSum );
/* FIXME: needs more work: */
/* image.GpValue */
@@ -444,6 +458,7 @@ static void test_Loader(void)
if (nt_header->OptionalHeader.SizeOfCode || nt_header->OptionalHeader.AddressOfEntryPoint)
@@ -605,6 +619,7 @@ static void test_Loader(void)
/* Mandatory are all fields up to SizeOfHeaders, everything else
* is really optional (at least that's true for XP).
*/
@ -66,7 +66,7 @@ index 91a6ff05161..3890d3ba3f3 100644
{ sizeof(dos_header),
1, FIELD_OFFSET(IMAGE_OPTIONAL_HEADER, CheckSum), 0x200, 0x200,
sizeof(dos_header) + sizeof(DWORD) + sizeof(IMAGE_FILE_HEADER) + FIELD_OFFSET(IMAGE_OPTIONAL_HEADER, CheckSum) + sizeof(IMAGE_SECTION_HEADER) + 0x10,
@@ -451,6 +466,7 @@ static void test_Loader(void)
@@ -612,6 +627,7 @@ static void test_Loader(void)
{ ERROR_SUCCESS, ERROR_BAD_EXE_FORMAT, ERROR_INVALID_ADDRESS,
ERROR_NOACCESS }
},
@ -74,7 +74,7 @@ index 91a6ff05161..3890d3ba3f3 100644
{ sizeof(dos_header),
0, FIELD_OFFSET(IMAGE_OPTIONAL_HEADER, CheckSum), 0x200, 0x200,
0xd0, /* beyond of the end of file */
@@ -519,6 +535,14 @@ static void test_Loader(void)
@@ -680,6 +696,14 @@ static void test_Loader(void)
0x40, /* minimal image size that Windows7 accepts */
0,
{ ERROR_SUCCESS }
@ -89,7 +89,7 @@ index 91a6ff05161..3890d3ba3f3 100644
}
};
int i;
@@ -738,6 +762,17 @@ static void test_Loader(void)
@@ -886,6 +910,18 @@ static void test_Loader(void)
ok(ret, "FreeLibrary error %d\n", GetLastError());
}
@ -104,9 +104,10 @@ index 91a6ff05161..3890d3ba3f3 100644
+ ok(0, "could not create %s\n", dll_name);
+ break;
+ }
query_image_section( i, dll_name, &nt_header );
+
query_image_section( i, dll_name, &nt_header, NULL );
}
else
--
2.14.1
1.9.1

View File

@ -1,7 +1,7 @@
From af4b00a0e6afd5a6512386e821a000411ca41b39 Mon Sep 17 00:00:00 2001
From 66f2053d1f72e821bd1100d8bf2266e73e2e2163 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 9 Apr 2017 03:13:25 +0200
Subject: server: Skip async completion when possible.
Subject: [PATCH] server: Skip async completion when possible.
---
dlls/ntdll/tests/pipe.c | 2 --
@ -11,10 +11,10 @@ Subject: server: Skip async completion when possible.
4 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/dlls/ntdll/tests/pipe.c b/dlls/ntdll/tests/pipe.c
index bda9a144ade..aa240edea21 100644
index bea849f..06be9eb 100644
--- a/dlls/ntdll/tests/pipe.c
+++ b/dlls/ntdll/tests/pipe.c
@@ -389,9 +389,7 @@ static void test_completion(void)
@@ -394,9 +394,7 @@ static void test_completion(void)
pov = (void *)0xdeadbeef;
ret = GetQueuedCompletionStatus(port, &num_bytes, &key, &pov, 1000);
@ -25,7 +25,7 @@ index bda9a144ade..aa240edea21 100644
CloseHandle(ov.hEvent);
diff --git a/server/async.c b/server/async.c
index 1cb020f7d42..210617c0014 100644
index 4f1bcf1..11bbb25 100644
--- a/server/async.c
+++ b/server/async.c
@@ -53,6 +53,7 @@ struct async
@ -63,7 +63,7 @@ index 1cb020f7d42..210617c0014 100644
}
@@ -375,8 +378,11 @@ void async_set_result( struct object *obj, unsigned int status, apc_param_t tota
data.user.args[2] = 0;
thread_queue_apc( async->thread, NULL, &data );
thread_queue_apc( NULL, async->thread, NULL, &data );
}
- else if (async->data.apc_context)
+ else if (async->data.apc_context && (!async->direct_result ||
@ -75,10 +75,10 @@ index 1cb020f7d42..210617c0014 100644
if (async->event) set_event( async->event );
else if (async->fd) set_fd_signaled( async->fd, 1 );
diff --git a/server/fd.c b/server/fd.c
index 51f4eac0cd5..d13068c8468 100644
index a6a96d6..64dbd1b 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -2422,7 +2422,7 @@ DECL_HANDLER(flush)
@@ -2434,7 +2434,7 @@ DECL_HANDLER(flush)
if (!fd) return;
@ -87,7 +87,7 @@ index 51f4eac0cd5..d13068c8468 100644
{
reply->event = async_handoff( async, fd->fd_ops->flush( fd, async ), NULL );
release_object( async );
@@ -2497,7 +2497,7 @@ DECL_HANDLER(read)
@@ -2533,7 +2533,7 @@ DECL_HANDLER(read)
if (!fd) return;
@ -96,7 +96,7 @@ index 51f4eac0cd5..d13068c8468 100644
{
reply->wait = async_handoff( async, fd->fd_ops->read( fd, async, req->pos ), NULL );
reply->options = fd->options;
@@ -2514,7 +2514,7 @@ DECL_HANDLER(write)
@@ -2550,7 +2550,7 @@ DECL_HANDLER(write)
if (!fd) return;
@ -105,7 +105,7 @@ index 51f4eac0cd5..d13068c8468 100644
{
reply->wait = async_handoff( async, fd->fd_ops->write( fd, async, req->pos ), &reply->size );
reply->options = fd->options;
@@ -2532,7 +2532,7 @@ DECL_HANDLER(ioctl)
@@ -2568,7 +2568,7 @@ DECL_HANDLER(ioctl)
if (!fd) return;
@ -115,10 +115,10 @@ index 51f4eac0cd5..d13068c8468 100644
reply->wait = async_handoff( async, fd->fd_ops->ioctl( fd, req->code, async ), NULL );
reply->options = fd->options;
diff --git a/server/file.h b/server/file.h
index fa41654e6b6..33b42554534 100644
index 1d25961..ed42fc4 100644
--- a/server/file.h
+++ b/server/file.h
@@ -180,7 +180,7 @@ extern struct object *create_serial( struct fd *fd );
@@ -185,7 +185,7 @@ extern struct object *create_serial( struct fd *fd );
/* async I/O functions */
extern void free_async_queue( struct async_queue *queue );
extern struct async *create_async( struct fd *fd, struct thread *thread, const async_data_t *data, struct iosb *iosb );
@ -128,5 +128,5 @@ index fa41654e6b6..33b42554534 100644
extern void queue_async( struct async_queue *queue, struct async *async );
extern void async_set_timeout( struct async *async, timeout_t timeout, unsigned int status );
--
2.13.1
1.9.1

View File

@ -1,7 +1,7 @@
From 76daaa88f6a1ec55668fdb5a1abcc4ac31149976 Mon Sep 17 00:00:00 2001
From 54abbae392fbf72e9abc241d7c1a36df27e0c9a0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Wed, 16 Aug 2017 02:45:23 +0200
Subject: kernelbase: Add semi-stub for PathCchCombineEx.
Subject: [PATCH] kernelbase: Add semi-stub for PathCchCombineEx.
---
configure.ac | 3 +-
@ -19,10 +19,10 @@ Subject: kernelbase: Add semi-stub for PathCchCombineEx.
create mode 100644 include/pathcch.h
diff --git a/configure.ac b/configure.ac
index 04091fc0ec9..4bd6bb35c8a 100644
index 7bb9c49..fc79b7a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3235,7 +3235,8 @@ WINE_CONFIG_TEST(dlls/jsproxy/tests)
@@ -3329,7 +3329,8 @@ WINE_CONFIG_TEST(dlls/jsproxy/tests)
WINE_CONFIG_DLL(kerberos)
WINE_CONFIG_DLL(kernel32,,[clean,implib])
WINE_CONFIG_TEST(dlls/kernel32/tests)
@ -33,7 +33,7 @@ index 04091fc0ec9..4bd6bb35c8a 100644
WINE_CONFIG_DLL(krnl386.exe16,enable_win16,[implib],[kernel])
WINE_CONFIG_DLL(ksuser)
diff --git a/dlls/api-ms-win-core-path-l1-1-0/api-ms-win-core-path-l1-1-0.spec b/dlls/api-ms-win-core-path-l1-1-0/api-ms-win-core-path-l1-1-0.spec
index cb10d89773c..4df147e6611 100644
index cb10d89..4df147e 100644
--- a/dlls/api-ms-win-core-path-l1-1-0/api-ms-win-core-path-l1-1-0.spec
+++ b/dlls/api-ms-win-core-path-l1-1-0/api-ms-win-core-path-l1-1-0.spec
@@ -8,7 +8,7 @@
@ -46,7 +46,7 @@ index cb10d89773c..4df147e6611 100644
@ stub PathCchIsRoot
@ stub PathCchRemoveBackslash
diff --git a/dlls/kernelbase/Makefile.in b/dlls/kernelbase/Makefile.in
index 74df98ce2d5..247c6bf392a 100644
index 74df98c..247c6bf 100644
--- a/dlls/kernelbase/Makefile.in
+++ b/dlls/kernelbase/Makefile.in
@@ -1,4 +1,6 @@
@ -58,7 +58,7 @@ index 74df98ce2d5..247c6bf392a 100644
C_SRCS = \
main.c
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
index 395b65839b8..f1745e00c89 100644
index 6c61c51..55737f9 100644
--- a/dlls/kernelbase/kernelbase.spec
+++ b/dlls/kernelbase/kernelbase.spec
@@ -1037,7 +1037,7 @@
@ -71,10 +71,10 @@ index 395b65839b8..f1745e00c89 100644
# @ stub PathCchIsRoot
# @ stub PathCchRemoveBackslash
diff --git a/dlls/kernelbase/main.c b/dlls/kernelbase/main.c
index b0a34786e2e..0410f38a122 100644
index 920fd12..eadb130 100644
--- a/dlls/kernelbase/main.c
+++ b/dlls/kernelbase/main.c
@@ -19,7 +19,11 @@
@@ -20,7 +20,11 @@
#include "windows.h"
#include "appmodel.h"
@ -86,8 +86,8 @@ index b0a34786e2e..0410f38a122 100644
WINE_DEFAULT_DEBUG_CHANNEL(kernelbase);
@@ -83,3 +87,28 @@ BOOL WINAPI QuirkIsEnabled3(void *unk1, void *unk2)
FIXME("(%p, %p) stub!\n", unk1, unk2);
@@ -97,3 +101,28 @@ BOOL WINAPI QuirkIsEnabled3(void *unk1, void *unk2)
return FALSE;
}
+
@ -117,7 +117,7 @@ index b0a34786e2e..0410f38a122 100644
+}
diff --git a/dlls/kernelbase/tests/Makefile.in b/dlls/kernelbase/tests/Makefile.in
new file mode 100644
index 00000000000..92f5ca57131
index 0000000..92f5ca5
--- /dev/null
+++ b/dlls/kernelbase/tests/Makefile.in
@@ -0,0 +1,5 @@
@ -128,7 +128,7 @@ index 00000000000..92f5ca57131
+ path.c
diff --git a/dlls/kernelbase/tests/path.c b/dlls/kernelbase/tests/path.c
new file mode 100644
index 00000000000..c848640a030
index 0000000..c848640
--- /dev/null
+++ b/dlls/kernelbase/tests/path.c
@@ -0,0 +1,113 @@
@ -246,20 +246,20 @@ index 00000000000..c848640a030
+ test_PathCchCombineEx();
+}
diff --git a/include/Makefile.in b/include/Makefile.in
index 025fe774552..8192e03536a 100644
index f064e96..6e7ffc1 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -564,6 +564,7 @@ HEADER_SRCS = \
@@ -572,6 +572,7 @@ HEADER_SRCS = \
oledberr.h \
oledlg.h \
patchapi.h \
+ pathcch.h \
pdh.h \
pdhmsg.h \
physicalmonitorenumerationapi.h \
perflib.h \
diff --git a/include/pathcch.h b/include/pathcch.h
new file mode 100644
index 00000000000..8831c5238d2
index 0000000..8831c52
--- /dev/null
+++ b/include/pathcch.h
@@ -0,0 +1,26 @@
@ -290,5 +290,5 @@ index 00000000000..8831c5238d2
+
+HRESULT WINAPI PathCchCombineEx(WCHAR *out, SIZE_T size, const WCHAR *path1, const WCHAR *path2, DWORD flags);
--
2.14.2
1.9.1

View File

@ -1,7 +1,7 @@
From 3f11f4c46bc1242c96fd0779f6594eadfc5ab5ff Mon Sep 17 00:00:00 2001
From 926d6492812bd4753109f8e4525d84d8105ab5fb Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 12 Jun 2017 00:16:08 +0200
Subject: loader: Implement preloader for Mac OS.
Subject: [PATCH] loader: Implement preloader for Mac OS.
---
Makefile.in | 1 +
@ -14,10 +14,10 @@ Subject: loader: Implement preloader for Mac OS.
7 files changed, 491 insertions(+), 53 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 22b2ae7230..29b6cbdd53 100644
index 6f1af8c..397ff16 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -89,6 +89,7 @@ WINELOADER_PROGRAMS = @WINELOADER_PROGRAMS@
@@ -90,6 +90,7 @@ WINELOADER_PROGRAMS = @WINELOADER_PROGRAMS@
WINELOADER_DEPENDS = @WINELOADER_DEPENDS@
WINELOADER_INSTALL = @WINELOADER_INSTALL@
WINELOADER_LDFLAGS = @WINELOADER_LDFLAGS@
@ -26,10 +26,10 @@ index 22b2ae7230..29b6cbdd53 100644
LIBWINE_IMPORTLIB = @LIBWINE_IMPORTLIB@
LIBWINE_INSTALL_LIB = @LIBWINE_INSTALL_LIB@
diff --git a/configure.ac b/configure.ac
index 0f2221963d..d9bdf413bb 100644
index fc79b7a..40dcc70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -683,6 +683,7 @@ AC_SUBST(LDRPATH_INSTALL,"")
@@ -707,6 +707,7 @@ AC_SUBST(LDRPATH_INSTALL,"")
AC_SUBST(LDRPATH_LOCAL,"")
AC_SUBST(LDEXECFLAGS,"")
AC_SUBST(WINELOADER_LDFLAGS,"")
@ -37,7 +37,7 @@ index 0f2221963d..d9bdf413bb 100644
LIBEXT="so"
DLLEXT=".so"
IMPLIBEXT="def"
@@ -741,9 +742,17 @@ case $host_os in
@@ -765,9 +766,17 @@ case $host_os in
AC_SUBST(APPLICATIONSERVICES_LIBS,"-framework ApplicationServices")
AC_SUBST(CORESERVICES_LIBS,"-framework CoreServices")
AC_SUBST(APPKIT_LIBS,"-framework AppKit")
@ -57,7 +57,7 @@ index 0f2221963d..d9bdf413bb 100644
if test "$ac_cv_header_DiskArbitration_DiskArbitration_h" = "yes"
then
dnl DiskArbitration API is not public on Darwin < 8.0, use it only if header found
@@ -856,6 +865,7 @@ case $host_os in
@@ -880,6 +889,7 @@ case $host_os in
enable_wineandroid_drv=${enable_wineandroid_drv:-yes}
WINE_TRY_CFLAGS([-fPIC -Wl,--export-dynamic],
[WINELOADER_LDFLAGS="-Wl,--export-dynamic"])
@ -65,7 +65,7 @@ index 0f2221963d..d9bdf413bb 100644
WINE_TRY_CFLAGS([-fPIC -Wl,--rpath,\$ORIGIN/../lib],
[LDRPATH_INSTALL="-Wl,--rpath,\\\$\$ORIGIN/\`\$(MAKEDEP) -R \${bindir} \${libdir}\`"
LDRPATH_LOCAL="-Wl,--rpath,\\\$\$ORIGIN/\$(top_builddir)/libs/wine"],
@@ -900,6 +910,7 @@ case $host_os in
@@ -927,6 +937,7 @@ case $host_os in
WINE_TRY_CFLAGS([-fPIC -Wl,--export-dynamic],
[WINELOADER_LDFLAGS="-Wl,--export-dynamic"])
@ -73,7 +73,7 @@ index 0f2221963d..d9bdf413bb 100644
WINE_TRY_CFLAGS([-fPIC -Wl,--rpath,\$ORIGIN/../lib],
[LDRPATH_INSTALL="-Wl,--rpath,\\\$\$ORIGIN/\`\$(MAKEDEP) -R \${bindir} \${libdir}\`:\$(DESTDIR)\${libdir}"
@@ -2009,6 +2020,14 @@ case $host_os in
@@ -2089,6 +2100,14 @@ case $host_os in
;;
esac
;;
@ -89,10 +89,10 @@ index 0f2221963d..d9bdf413bb 100644
dnl **** Check for functions ****
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index ee9c8d0195..f115576e1d 100644
index 6efdf5a..8303a03 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -1840,11 +1840,9 @@ void virtual_release_address_space(void)
@@ -2424,11 +2424,9 @@ void virtual_release_address_space(void)
}
else
{
@ -105,10 +105,10 @@ index ee9c8d0195..f115576e1d 100644
server_leave_uninterrupted_section( &csVirtual, &sigset );
diff --git a/libs/wine/config.c b/libs/wine/config.c
index be9f401d9e..bccb36a6c1 100644
index 45a7c48..cba4224 100644
--- a/libs/wine/config.c
+++ b/libs/wine/config.c
@@ -654,7 +654,7 @@ void wine_exec_wine_binary( const char *name, char **argv, const char *env_var )
@@ -678,7 +678,7 @@ void wine_exec_wine_binary( const char *name, char **argv, const char *env_var )
if (!name) name = argv0_name; /* no name means default loader */
@ -118,7 +118,7 @@ index be9f401d9e..bccb36a6c1 100644
#else
use_preloader = 0;
diff --git a/loader/Makefile.in b/loader/Makefile.in
index 4fb91ff541..b715f02257 100644
index 4fb91ff..b715f02 100644
--- a/loader/Makefile.in
+++ b/loader/Makefile.in
@@ -26,7 +26,7 @@ wine64_DEPS = $(WINELOADER_DEPENDS)
@ -132,7 +132,7 @@ index 4fb91ff541..b715f02257 100644
-wine64_preloader_LDFLAGS = -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c400000
+wine64_preloader_LDFLAGS = $(WINEPRELOADER_LDFLAGS)
diff --git a/loader/main.c b/loader/main.c
index 13740c7b3c..5212e3f079 100644
index 39d26e6..da32fc9 100644
--- a/loader/main.c
+++ b/loader/main.c
@@ -50,30 +50,6 @@
@ -187,7 +187,7 @@ index 13740c7b3c..5212e3f079 100644
* check_command_line
*
@@ -315,6 +284,13 @@ static int pre_exec(void)
return 1; /* we have a preloader on x86-64 */
return 1; /* we have a preloader on x86-64/arm64 */
}
+#elif defined(__APPLE__) && (defined(__i386__) || defined(__x86_64__))
@ -215,7 +215,7 @@ index 13740c7b3c..5212e3f079 100644
wine_init( argc, argv, error, sizeof(error) );
diff --git a/loader/preloader.c b/loader/preloader.c
index 5e6add7830..90ab6764fa 100644
index 725926e..d2f8dc15 100644
--- a/loader/preloader.c
+++ b/loader/preloader.c
@@ -4,6 +4,8 @@
@ -525,7 +525,7 @@ index 5e6add7830..90ab6764fa 100644
#ifdef __i386__
/* data for setting up the glibc-style thread-local storage in %gs */
@@ -458,16 +698,17 @@ SYSCALL_NOERR( wld_getegid, 108 /* SYS_getegid */ );
@@ -564,16 +804,17 @@ SYSCALL_NOERR( wld_getegid, 177 /* SYS_getegid */ );
#else
#error preloader not implemented for this CPU
#endif
@ -545,7 +545,7 @@ index 5e6add7830..90ab6764fa 100644
{
if (len <= 0) return 0;
while ((--len > 0) && *str1 && (*str1 == *str2)) { str1++; str2++; }
@@ -560,6 +801,8 @@ static __attribute__((noreturn,format(printf,1,2))) void fatal_error(const char
@@ -666,6 +907,8 @@ static __attribute__((noreturn,format(printf,1,2))) void fatal_error(const char
wld_exit(1);
}
@ -554,7 +554,7 @@ index 5e6add7830..90ab6764fa 100644
#ifdef DUMP_AUX_INFO
/*
* Dump interesting bits of the ELF auxv_t structure that is passed
@@ -1039,6 +1282,8 @@ found:
@@ -1148,6 +1391,8 @@ found:
return (void *)(symtab[idx].st_value + map->l_addr);
}
@ -563,7 +563,7 @@ index 5e6add7830..90ab6764fa 100644
/*
* preload_reserve
*
@@ -1070,6 +1315,7 @@ static void preload_reserve( const char *str )
@@ -1179,6 +1424,7 @@ static void preload_reserve( const char *str )
/* sanity checks */
if (end <= start) start = end = NULL;
@ -571,7 +571,7 @@ index 5e6add7830..90ab6764fa 100644
else if ((char *)end > preloader_start &&
(char *)start <= preloader_end)
{
@@ -1077,6 +1323,7 @@ static void preload_reserve( const char *str )
@@ -1186,6 +1432,7 @@ static void preload_reserve( const char *str )
start, end, preloader_start, preloader_end );
start = end = NULL;
}
@ -579,7 +579,7 @@ index 5e6add7830..90ab6764fa 100644
/* check for overlap with low memory areas */
for (i = 0; preload_info[i].size; i++)
@@ -1101,7 +1348,7 @@ error:
@@ -1210,7 +1457,7 @@ error:
}
/* check if address is in one of the reserved ranges */
@ -588,7 +588,7 @@ index 5e6add7830..90ab6764fa 100644
{
int i;
@@ -1125,6 +1372,203 @@ static void remove_preload_range( int i )
@@ -1234,6 +1481,203 @@ static void remove_preload_range( int i )
}
}
@ -792,12 +792,12 @@ index 5e6add7830..90ab6764fa 100644
/*
* is_in_preload_range
*
@@ -1293,3 +1737,5 @@ void* wld_start( void **stack )
@@ -1406,3 +1850,5 @@ void* wld_start( void **stack )
return (void *)ld_so_map.l_entry;
}
+
+#endif /* __APPLE__ */
--
2.13.1
1.9.1

View File

@ -1,7 +1,7 @@
From 4300d95851054139480497a5f268c64e152ec5e2 Mon Sep 17 00:00:00 2001
From 3418775c892b4fff2dd9ca879b7d4d1059bd065b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 15 Jan 2016 12:58:17 +0100
Subject: msvcr120: Add stub for _SetWinRTOutOfMemoryExceptionCallback.
Subject: [PATCH] msvcr120: Add stub for _SetWinRTOutOfMemoryExceptionCallback.
---
dlls/msvcr120/msvcr120.spec | 2 +-
@ -10,7 +10,7 @@ Subject: msvcr120: Add stub for _SetWinRTOutOfMemoryExceptionCallback.
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec
index bb14b78433..05a4d28d77 100644
index b6f0e1f..19088e4 100644
--- a/dlls/msvcr120/msvcr120.spec
+++ b/dlls/msvcr120/msvcr120.spec
@@ -844,7 +844,7 @@
@ -23,7 +23,7 @@ index bb14b78433..05a4d28d77 100644
@ stub -arch=win64 _SetThrowImageBase
@ cdecl _Strftime(ptr long str ptr ptr)
diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec
index 060438d720..4a579af34f 100644
index 7a9b6aa..166d6b8 100644
--- a/dlls/msvcr120_app/msvcr120_app.spec
+++ b/dlls/msvcr120_app/msvcr120_app.spec
@@ -838,7 +838,7 @@
@ -36,10 +36,10 @@ index 060438d720..4a579af34f 100644
@ stub -arch=win64 _SetThrowImageBase
@ cdecl _Strftime(ptr long str ptr ptr) msvcr120._Strftime
diff --git a/dlls/msvcrt/misc.c b/dlls/msvcrt/misc.c
index 9e3836480b..7d3d362ba1 100644
index c197d69..c5f8f42 100644
--- a/dlls/msvcrt/misc.c
+++ b/dlls/msvcrt/misc.c
@@ -551,3 +551,11 @@ void CDECL MSVCRT__crtSleep(DWORD timeout)
@@ -578,4 +578,12 @@ void CDECL MSVCRT__crtSleep(DWORD timeout)
TRACE("(%u)\n", timeout);
Sleep(timeout);
}
@ -51,6 +51,7 @@ index 9e3836480b..7d3d362ba1 100644
+{
+ FIXME("(%p): stub\n", callback);
+}
#endif
--
2.11.0
1.9.1

View File

@ -1,7 +1,7 @@
From f6967e9045f8bfed79aa6b995c5d1dc96a44c17b Mon Sep 17 00:00:00 2001
From cd25e5befd357c848ae4e82f5166ea2465bd6ad7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 3 Apr 2016 18:22:29 +0200
Subject: iccvid: Fix calculation of stride and size.
Subject: [PATCH] iccvid: Fix calculation of stride and size.
---
dlls/iccvid/iccvid.c | 10 +++++++---
@ -9,11 +9,11 @@ Subject: iccvid: Fix calculation of stride and size.
2 files changed, 47 insertions(+), 3 deletions(-)
diff --git a/dlls/iccvid/iccvid.c b/dlls/iccvid/iccvid.c
index e5d514703ee..bf9e48883d3 100644
index 89d282b..3977d95 100644
--- a/dlls/iccvid/iccvid.c
+++ b/dlls/iccvid/iccvid.c
@@ -91,6 +91,10 @@ static inline BOOL heap_free(void *mem)
return HeapFree(GetProcessHeap(), 0, mem);
@@ -169,6 +169,10 @@ int x, y;
}
}
+static inline int get_stride(int width, int depth)
@ -22,8 +22,8 @@ index e5d514703ee..bf9e48883d3 100644
+}
/* ------------------------------------------------------------------------ */
static unsigned char *in_buffer, uiclip[1024], *uiclp = NULL;
@@ -459,7 +463,7 @@ static void decode_cinepak(cinepak_info *cvinfo, unsigned char *buf, int size,
static void cvid_v4_32(unsigned char *frm, unsigned char *limit, int stride, BOOL inverted,
@@ -450,7 +454,7 @@ static void decode_cinepak(cinepak_info *cvinfo, unsigned char *buf, int size,
break;
}
@ -32,7 +32,7 @@ index e5d514703ee..bf9e48883d3 100644
frm_ptr = output;
if(frame.length != size)
@@ -844,9 +848,9 @@ static LRESULT ICCVID_DecompressGetFormat( ICCVID_Info *info, LPBITMAPINFO in, L
@@ -835,9 +839,9 @@ static LRESULT ICCVID_DecompressGetFormat( ICCVID_Info *info, LPBITMAPINFO in, L
if( out )
{
memcpy( out, in, size );
@ -45,7 +45,7 @@ index e5d514703ee..bf9e48883d3 100644
}
return size;
diff --git a/dlls/msvfw32/tests/msvfw.c b/dlls/msvfw32/tests/msvfw.c
index 000e615ad0f..6f32034954a 100644
index 127dc24..2507ead 100644
--- a/dlls/msvfw32/tests/msvfw.c
+++ b/dlls/msvfw32/tests/msvfw.c
@@ -93,6 +93,7 @@ static void test_Locate(void)
@ -103,5 +103,5 @@ index 000e615ad0f..6f32034954a 100644
bo.biBitCount = bi.biBitCount = 8;
--
2.11.0
1.9.1

View File

@ -1,164 +0,0 @@
From e8808565313aeb31f096c26a1d262fce1992dc25 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 21 Mar 2017 17:25:37 +0100
Subject: ntdll: Implement querying for FileNameInformation of named pipes in
NtQueryInformationFile.
---
dlls/ntdll/file.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++--
dlls/ntdll/tests/file.c | 25 +++++++++++++++++
2 files changed, 96 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 3568c256c8..327b71df2b 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -2593,6 +2593,41 @@ NTSTATUS server_get_unix_name( HANDLE handle, ANSI_STRING *unix_name )
return ret;
}
+static NTSTATUS server_get_object_name( HANDLE handle, UNICODE_STRING *object_name )
+{
+ data_size_t total, size = 1024;
+ NTSTATUS ret;
+ WCHAR *name;
+
+ for (;;)
+ {
+ name = RtlAllocateHeap( GetProcessHeap(), 0, size + 2 );
+ if (!name) return STATUS_NO_MEMORY;
+ object_name->MaximumLength = size + 2;
+
+ SERVER_START_REQ( get_object_info )
+ {
+ req->handle = wine_server_obj_handle( handle );
+ wine_server_set_reply( req, name, size );
+ ret = wine_server_call( req );
+ total = reply->total;
+ }
+ SERVER_END_REQ;
+ if (ret) break;
+
+ if (total <= size)
+ {
+ name[total / sizeof(WCHAR)] = 0;
+ object_name->Buffer = name;
+ object_name->Length = total;
+ break;
+ }
+ RtlFreeHeap( GetProcessHeap(), 0, name );
+ size = total;
+ }
+ return ret;
+}
+
static NTSTATUS fill_name_info( const ANSI_STRING *unix_name, FILE_NAME_INFORMATION *info, LONG *name_len )
{
UNICODE_STRING nt_name;
@@ -2729,7 +2764,14 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
if (class != FilePipeInformation && class != FilePipeLocalInformation)
{
if ((io->u.Status = server_get_unix_fd( hFile, 0, &fd, &needs_close, NULL, NULL )))
- return io->u.Status;
+ {
+ if (io->u.Status != STATUS_PIPE_LISTENING || class != FileNameInformation)
+ return io->u.Status;
+
+ io->u.Status = STATUS_SUCCESS;
+ needs_close = FALSE;
+ fd = -1;
+ }
}
switch (class)
@@ -2910,16 +2952,43 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
break;
case FileNameInformation:
{
+ LONG name_len = len - FIELD_OFFSET(FILE_NAME_INFORMATION, FileName);
FILE_NAME_INFORMATION *info = ptr;
ANSI_STRING unix_name;
if (!(io->u.Status = server_get_unix_name( hFile, &unix_name )))
{
- LONG name_len = len - FIELD_OFFSET(FILE_NAME_INFORMATION, FileName);
io->u.Status = fill_name_info( &unix_name, info, &name_len );
RtlFreeAnsiString( &unix_name );
io->Information = FIELD_OFFSET(FILE_NAME_INFORMATION, FileName) + name_len;
}
+ else if (io->u.Status == STATUS_OBJECT_TYPE_MISMATCH)
+ {
+ static const WCHAR pipe_prefixW[] = {'\\','D','e','v','i','c','e','\\','N','a','m','e','d','P','i','p','e'};
+ UNICODE_STRING object_name;
+
+ if ((io->u.Status = server_get_object_name( hFile, &object_name )))
+ break;
+
+ if (strncmpW(object_name.Buffer, pipe_prefixW, sizeof(pipe_prefixW) / sizeof(WCHAR)) ||
+ object_name.Buffer[ sizeof(pipe_prefixW) / sizeof(WCHAR) ] != '\\')
+ {
+ io->u.Status = STATUS_OBJECT_TYPE_MISMATCH;
+ RtlFreeUnicodeString( &object_name );
+ break;
+ }
+
+ if (name_len < object_name.Length - sizeof(pipe_prefixW))
+ io->u.Status = STATUS_BUFFER_OVERFLOW;
+ else
+ name_len = object_name.Length - sizeof(pipe_prefixW);
+
+ info->FileNameLength = name_len;
+ memcpy(info->FileName, object_name.Buffer + sizeof(pipe_prefixW) / sizeof(WCHAR), name_len);
+
+ RtlFreeUnicodeString( &object_name );
+ io->Information = FIELD_OFFSET(FILE_NAME_INFORMATION, FileName) + name_len;
+ }
}
break;
case FileNetworkOpenInformation:
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index 9b0bdf4e03..59ce63fa24 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -1890,6 +1890,7 @@ static void test_file_rename_information(void)
static void test_file_link_information(void)
{
+ static const WCHAR pipeW[] = {'\\','\\','.','\\','p','i','p','e','\\','w','i','n','e','_','t','e','s','t',0};
static const WCHAR foo_txtW[] = {'\\','f','o','o','.','t','x','t',0};
static const WCHAR fooW[] = {'f','o','o',0};
WCHAR tmp_path[MAX_PATH], oldpath[MAX_PATH + 16], newpath[MAX_PATH + 16], *filename, *p;
@@ -2512,6 +2513,30 @@ static void test_file_link_information(void)
CloseHandle( handle );
CloseHandle( handle2 );
+
+ handle = CreateEventA( NULL, FALSE, FALSE, "wine_test_event" );
+ ok( !!handle, "Failed to create event: %u\n", GetLastError());
+
+ fni = HeapAlloc( GetProcessHeap(), 0, sizeof(FILE_NAME_INFORMATION) + MAX_PATH * sizeof(WCHAR) );
+ res = pNtQueryInformationFile( handle, &io, fni, sizeof(FILE_NAME_INFORMATION) + MAX_PATH * sizeof(WCHAR), FileNameInformation );
+ ok( res == STATUS_OBJECT_TYPE_MISMATCH, "res expected STATUS_OBJECT_TYPE_MISMATCH, got %x\n", res );
+ HeapFree( GetProcessHeap(), 0, fni );
+
+ CloseHandle( handle );
+
+ handle = CreateNamedPipeW( pipeW, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE|PIPE_READMODE_BYTE, 10, 512, 512, 0, NULL);
+ ok( handle != INVALID_HANDLE_VALUE, "Failed to create named pipe: %u\n", GetLastError());
+
+ fni = HeapAlloc( GetProcessHeap(), 0, sizeof(FILE_NAME_INFORMATION) + MAX_PATH * sizeof(WCHAR) );
+ res = pNtQueryInformationFile( handle, &io, fni, sizeof(FILE_NAME_INFORMATION) + MAX_PATH * sizeof(WCHAR), FileNameInformation );
+ ok( res == STATUS_SUCCESS, "res expected STATUS_SUCCESS, got %x\n", res );
+ fni->FileName[ fni->FileNameLength / sizeof(WCHAR) ] = 0;
+ ok( !lstrcmpiW(fni->FileName, pipeW + 8), "FileName expected %s, got %s\n",
+ wine_dbgstr_w(pipeW + 8), wine_dbgstr_w(fni->FileName) );
+ HeapFree( GetProcessHeap(), 0, fni );
+
+ CloseHandle( handle );
+
HeapFree( GetProcessHeap(), 0, fli );
delete_object( oldpath );
delete_object( newpath );
--
2.11.0

View File

@ -1 +0,0 @@
Fixes: Implement FileNameInformation in NtQueryInformationFile for named pipes

View File

@ -1,7 +1,8 @@
From 13b20600cb2924b63ecf7c0b37db45fd7c26a8ce Mon Sep 17 00:00:00 2001
From 4b31157383a5e422660c17d47fd4cda511a991a4 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 7 Nov 2014 03:26:18 +0100
Subject: ntdll: Return correct values in GetThreadTimes() for all threads.
Subject: [PATCH] ntdll: Return correct values in GetThreadTimes() for all
threads.
Based on a patch by Ray Hinchliffe <ray@pobox.co.uk>.
---
@ -11,7 +12,7 @@ Based on a patch by Ray Hinchliffe <ray@pobox.co.uk>.
3 files changed, 69 insertions(+), 17 deletions(-)
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 95b7add..a3b1cb0 100644
index c999d4b..1491ebb 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -23,6 +23,8 @@
@ -20,10 +21,10 @@ index 95b7add..a3b1cb0 100644
#include <stdarg.h>
+#include <string.h>
+#include <stdio.h>
#include <limits.h>
#include <sys/types.h>
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
@@ -963,7 +965,10 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
@@ -1017,7 +1019,10 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
case ThreadTimes:
{
KERNEL_USER_TIMES kusrt;
@ -34,7 +35,7 @@ index 95b7add..a3b1cb0 100644
SERVER_START_REQ( get_thread_times )
{
req->handle = wine_server_obj_handle( handle );
@@ -972,36 +977,79 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
@@ -1026,36 +1031,79 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
{
kusrt.CreateTime.QuadPart = reply->creation_time;
kusrt.ExitTime.QuadPart = reply->exit_time;
@ -132,10 +133,10 @@ index 95b7add..a3b1cb0 100644
if (ret_len) *ret_len = min( length, sizeof(kusrt) );
}
diff --git a/server/protocol.def b/server/protocol.def
index 15735e0..967bc81 100644
index 3bed47a..031b490 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -856,6 +856,8 @@ struct rawinput_device
@@ -908,6 +908,8 @@ struct rawinput_device
@REPLY
timeout_t creation_time; /* thread creation time */
timeout_t exit_time; /* thread exit time */
@ -145,10 +146,10 @@ index 15735e0..967bc81 100644
diff --git a/server/thread.c b/server/thread.c
index 902848e..f2b0853 100644
index 2cf5054..46fc9a7 100644
--- a/server/thread.c
+++ b/server/thread.c
@@ -1394,6 +1394,8 @@ DECL_HANDLER(get_thread_times)
@@ -1413,6 +1413,8 @@ DECL_HANDLER(get_thread_times)
{
reply->creation_time = thread->creation_time;
reply->exit_time = thread->exit_time;
@ -158,5 +159,5 @@ index 902848e..f2b0853 100644
release_object( thread );
}
--
2.4.5
1.9.1

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "389c3add0ad93f3b2180c636363b25f6c78757a2"
echo "65989f2ace1b06617638e31cb7ba56deb38fe690"
}
# Show version information
@ -842,9 +842,6 @@ patch_enable ()
kernel32-LocaleNameToLCID)
enable_kernel32_LocaleNameToLCID="$2"
;;
kernel32-MODULE_get_binary_info)
enable_kernel32_MODULE_get_binary_info="$2"
;;
kernel32-Misalign_Workaround)
enable_kernel32_Misalign_Workaround="$2"
;;
@ -1004,9 +1001,6 @@ patch_enable ()
ntdll-FileFsVolumeInformation)
enable_ntdll_FileFsVolumeInformation="$2"
;;
ntdll-FileNameInformation)
enable_ntdll_FileNameInformation="$2"
;;
ntdll-Fix_Alignment)
enable_ntdll_Fix_Alignment="$2"
;;
@ -2734,9 +2728,6 @@ if test "$enable_loader_OSX_Preloader" -eq 1; then
fi
if test "$enable_kernel32_SetFileCompletionNotificationModes" -eq 1; then
if test "$enable_ntdll_FileNameInformation" -gt 1; then
abort "Patchset ntdll-FileNameInformation disabled, but kernel32-SetFileCompletionNotificationModes depends on that."
fi
enable_ntdll_FileNameInformation=1
fi
@ -5166,21 +5157,6 @@ if test "$enable_kernel32_LocaleNameToLCID" -eq 1; then
) >> "$patchlist"
fi
# Patchset kernel32-MODULE_get_binary_info
# |
# | This patchset fixes the following Wine bugs:
# | * [#43217] Implement detection for position-independent executables
# |
# | Modified files:
# | * dlls/kernel32/module.c
# |
if test "$enable_kernel32_MODULE_get_binary_info" -eq 1; then
patch_apply kernel32-MODULE_get_binary_info/0001-kernel32-Add-detection-for-position-independent-exec.patch
(
printf '%s\n' '+ { "Sebastian Lackner", "kernel32: Add detection for position independent executables.", 1 },';
) >> "$patchlist"
fi
# Patchset kernel32-Misalign_Workaround
# |
# | This patchset fixes the following Wine bugs:
@ -5318,23 +5294,8 @@ if test "$enable_kernel32_SCSI_Sysfs" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntdll-FileNameInformation
# |
# | Modified files:
# | * dlls/ntdll/file.c, dlls/ntdll/tests/file.c
# |
if test "$enable_ntdll_FileNameInformation" -eq 1; then
patch_apply ntdll-FileNameInformation/0001-ntdll-Implement-querying-for-FileNameInformation-of-.patch
(
printf '%s\n' '+ { "Michael Müller", "ntdll: Implement querying for FileNameInformation of named pipes in NtQueryInformationFile.", 1 },';
) >> "$patchlist"
fi
# Patchset kernel32-SetFileCompletionNotificationModes
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * ntdll-FileNameInformation
# |
# | This patchset fixes the following Wine bugs:
# | * [#38960] Add support for kernel32.SetFileCompletionNotificationModes
# |
@ -6319,7 +6280,7 @@ fi
# Patchset ntdll-NtQueryEaFile
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * ntdll-FileNameInformation, kernel32-SetFileCompletionNotificationModes
# | * kernel32-SetFileCompletionNotificationModes
# |
# | Modified files:
# | * dlls/ntdll/file.c, dlls/ntdll/tests/file.c
@ -6334,7 +6295,7 @@ fi
# Patchset ntdll-Junction_Points
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * ntdll-FileNameInformation, kernel32-SetFileCompletionNotificationModes, ntdll-NtQueryEaFile
# | * kernel32-SetFileCompletionNotificationModes, ntdll-NtQueryEaFile
# |
# | This patchset fixes the following Wine bugs:
# | * [#12401] Support for Junction Points