Rebased against c3beca6c8fc8c07ecd992e64f8f8d0dda3a10ac8

This commit is contained in:
Alistair Leslie-Hughes 2018-02-21 11:20:15 +11:00
parent 8b6ef3476f
commit a14e2990e5
42 changed files with 346 additions and 329 deletions

View File

@ -1,36 +1,40 @@
From 3c523f6408b12cbf2f70ae857df3a386e8b18cb4 Mon Sep 17 00:00:00 2001
From 64d85e9c694c674a6ade54a8778e981db24eaf86 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 6 Aug 2017 03:15:34 +0200
Subject: programs/runas: Basic implementation for starting processes with a
different trustlevel.
Subject: [PATCH] programs/runas: Basic implementation for starting processes
with a different trustlevel.
---
configure.ac | 1 +
configure.ac | 5 +-
programs/runas/Makefile.in | 8 ++
programs/runas/runas.c | 214 +++++++++++++++++++++++++++++++++++++++++++++
programs/runas/runas.h | 26 ++++++
programs/runas/runas.rc | 39 +++++++++
5 files changed, 288 insertions(+)
5 files changed, 290 insertions(+), 2 deletions(-)
create mode 100644 programs/runas/Makefile.in
create mode 100644 programs/runas/runas.c
create mode 100644 programs/runas/runas.h
create mode 100644 programs/runas/runas.rc
diff --git a/configure.ac b/configure.ac
index edc100f4637..b9c648bce43 100644
index 2996010..4051d50 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3861,6 +3861,7 @@ WINE_CONFIG_TEST(programs/regedit/tests)
@@ -3821,8 +3821,9 @@ WINE_CONFIG_PROGRAM(regasm,,[install])
WINE_CONFIG_PROGRAM(regedit,,[install,installbin,manpage])
WINE_CONFIG_TEST(programs/regedit/tests)
WINE_CONFIG_PROGRAM(regsvcs,,[install])
WINE_CONFIG_PROGRAM(regsvr32,,[clean,install,installbin,manpage])
WINE_CONFIG_PROGRAM(rpcss,,[clean,install])
-WINE_CONFIG_PROGRAM(regsvr32,,[install,installbin,manpage])
-WINE_CONFIG_PROGRAM(rpcss,,[install])
+WINE_CONFIG_PROGRAM(regsvr32,,[clean,install,installbin,manpage])
+WINE_CONFIG_PROGRAM(rpcss,,[clean,install])
+WINE_CONFIG_PROGRAM(runas,,[install])
WINE_CONFIG_PROGRAM(rundll.exe16,enable_win16,[install])
WINE_CONFIG_PROGRAM(rundll32,,[install])
WINE_CONFIG_PROGRAM(sc,,[install])
diff --git a/programs/runas/Makefile.in b/programs/runas/Makefile.in
new file mode 100644
index 00000000000..be9434b214a
index 0000000..be9434b
--- /dev/null
+++ b/programs/runas/Makefile.in
@@ -0,0 +1,8 @@
@ -44,7 +48,7 @@ index 00000000000..be9434b214a
+RC_SRCS = runas.rc
diff --git a/programs/runas/runas.c b/programs/runas/runas.c
new file mode 100644
index 00000000000..cfd1c73ac56
index 0000000..cfd1c73
--- /dev/null
+++ b/programs/runas/runas.c
@@ -0,0 +1,214 @@
@ -264,7 +268,7 @@ index 00000000000..cfd1c73ac56
+}
diff --git a/programs/runas/runas.h b/programs/runas/runas.h
new file mode 100644
index 00000000000..40599a3b33b
index 0000000..40599a3
--- /dev/null
+++ b/programs/runas/runas.h
@@ -0,0 +1,26 @@
@ -296,7 +300,7 @@ index 00000000000..40599a3b33b
+#define STRING_START_ERROR 104
diff --git a/programs/runas/runas.rc b/programs/runas/runas.rc
new file mode 100644
index 00000000000..f9297a44794
index 0000000..f9297a4
--- /dev/null
+++ b/programs/runas/runas.rc
@@ -0,0 +1,39 @@
@ -340,5 +344,5 @@ index 00000000000..f9297a44794
+ %2!u!: %3\n"
+}
--
2.13.1
1.9.1

View File

@ -1,33 +1,35 @@
From e20e1494010e20efd0325efe9c535651d4750dfe Mon Sep 17 00:00:00 2001
From 7e17dfac73025ee2a51c2791c412abe47b36677c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 17 Jan 2016 01:11:46 +0100
Subject: iertutil: Add dll and add stub for ordinal 811.
Subject: [PATCH] iertutil: Add dll and add stub for ordinal 811.
---
configure.ac | 1 +
configure.ac | 3 +-
dlls/iertutil/Makefile.in | 4 +
dlls/iertutil/iertutil.spec | 521 ++++++++++++++++++++++++++++++++++++++++++++
dlls/iertutil/main.c | 48 ++++
4 files changed, 574 insertions(+)
4 files changed, 575 insertions(+), 1 deletion(-)
create mode 100644 dlls/iertutil/Makefile.in
create mode 100644 dlls/iertutil/iertutil.spec
create mode 100644 dlls/iertutil/main.c
diff --git a/configure.ac b/configure.ac
index 5ea7db07294..13fe97eed7a 100644
index 4051d50..a5c5a96 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3172,6 +3172,7 @@ WINE_CONFIG_DLL(icmp)
WINE_CONFIG_DLL(ieframe,,[clean,implib])
@@ -3263,7 +3263,8 @@ WINE_CONFIG_DLL(iccvid)
WINE_CONFIG_DLL(icmp)
WINE_CONFIG_DLL(ieframe,,[implib])
WINE_CONFIG_TEST(dlls/ieframe/tests)
WINE_CONFIG_DLL(ieproxy,,[clean])
-WINE_CONFIG_DLL(ieproxy)
+WINE_CONFIG_DLL(ieproxy,,[clean])
+WINE_CONFIG_DLL(iertutil)
WINE_CONFIG_DLL(ifsmgr.vxd,enable_win16)
WINE_CONFIG_DLL(imaadp32.acm)
WINE_CONFIG_DLL(imagehlp,,[implib])
diff --git a/dlls/iertutil/Makefile.in b/dlls/iertutil/Makefile.in
new file mode 100644
index 00000000000..268026e7031
index 0000000..268026e
--- /dev/null
+++ b/dlls/iertutil/Makefile.in
@@ -0,0 +1,4 @@
@ -37,7 +39,7 @@ index 00000000000..268026e7031
+ main.c
diff --git a/dlls/iertutil/iertutil.spec b/dlls/iertutil/iertutil.spec
new file mode 100644
index 00000000000..a13779bebbd
index 0000000..a13779b
--- /dev/null
+++ b/dlls/iertutil/iertutil.spec
@@ -0,0 +1,521 @@
@ -564,7 +566,7 @@ index 00000000000..a13779bebbd
+@ stub UriFromHostAndScheme
diff --git a/dlls/iertutil/main.c b/dlls/iertutil/main.c
new file mode 100644
index 00000000000..2b993a44ca4
index 0000000..2b993a4
--- /dev/null
+++ b/dlls/iertutil/main.c
@@ -0,0 +1,48 @@
@ -617,5 +619,5 @@ index 00000000000..2b993a44ca4
+ return FALSE;
+}
--
2.13.1
1.9.1

View File

@ -1,8 +1,8 @@
From 9b292e1bcfc18eecb70ac34fdd302d1274f68bb0 Mon Sep 17 00:00:00 2001
From 41b8290ff725b97b059468904eb7c351326617df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 17 Jan 2016 17:12:45 +0100
Subject: ext-ms-win-appmodel-usercontext-l1-1-0: Add dll and add stub for
UserContextExtInitialize.
Subject: [PATCH] ext-ms-win-appmodel-usercontext-l1-1-0: Add dll and add stub
for UserContextExtInitialize.
---
configure.ac | 1 +
@ -15,12 +15,12 @@ Subject: ext-ms-win-appmodel-usercontext-l1-1-0: Add dll and add stub for
create mode 100644 dlls/ext-ms-win-appmodel-usercontext-l1-1-0/main.c
diff --git a/configure.ac b/configure.ac
index cd6fe607f65..3e0f37d2753 100644
index b94569c..42bbf8d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3126,6 +3126,7 @@ WINE_CONFIG_DLL(evr)
@@ -3207,6 +3207,7 @@ WINE_CONFIG_DLL(evr)
WINE_CONFIG_TEST(dlls/evr/tests)
WINE_CONFIG_DLL(explorerframe,,[clean])
WINE_CONFIG_DLL(explorerframe)
WINE_CONFIG_TEST(dlls/explorerframe/tests)
+WINE_CONFIG_DLL(ext-ms-win-appmodel-usercontext-l1-1-0)
WINE_CONFIG_DLL(ext-ms-win-authz-context-l1-1-0)
@ -28,7 +28,7 @@ index cd6fe607f65..3e0f37d2753 100644
WINE_CONFIG_DLL(ext-ms-win-gdi-dc-create-l1-1-1)
diff --git a/dlls/ext-ms-win-appmodel-usercontext-l1-1-0/Makefile.in b/dlls/ext-ms-win-appmodel-usercontext-l1-1-0/Makefile.in
new file mode 100644
index 00000000000..16eee7588ff
index 0000000..16eee75
--- /dev/null
+++ b/dlls/ext-ms-win-appmodel-usercontext-l1-1-0/Makefile.in
@@ -0,0 +1,4 @@
@ -38,7 +38,7 @@ index 00000000000..16eee7588ff
+ main.c
diff --git a/dlls/ext-ms-win-appmodel-usercontext-l1-1-0/ext-ms-win-appmodel-usercontext-l1-1-0.spec b/dlls/ext-ms-win-appmodel-usercontext-l1-1-0/ext-ms-win-appmodel-usercontext-l1-1-0.spec
new file mode 100644
index 00000000000..7642d156c94
index 0000000..7642d15
--- /dev/null
+++ b/dlls/ext-ms-win-appmodel-usercontext-l1-1-0/ext-ms-win-appmodel-usercontext-l1-1-0.spec
@@ -0,0 +1,3 @@
@ -47,7 +47,7 @@ index 00000000000..7642d156c94
+@ stub UserContextExtSetToken
diff --git a/dlls/ext-ms-win-appmodel-usercontext-l1-1-0/main.c b/dlls/ext-ms-win-appmodel-usercontext-l1-1-0/main.c
new file mode 100644
index 00000000000..7a9e75f7109
index 0000000..7a9e75f
--- /dev/null
+++ b/dlls/ext-ms-win-appmodel-usercontext-l1-1-0/main.c
@@ -0,0 +1,35 @@
@ -87,5 +87,5 @@ index 00000000000..7a9e75f7109
+ return S_OK;
+}
--
2.14.1
1.9.1

View File

@ -1,4 +1,4 @@
From 493f7a848054d2d11d4f9c915a46055ba6f2bf24 Mon Sep 17 00:00:00 2001
From eafc346618f1b1c5355f67ccb4381ac708d8cffe Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 26 Dec 2016 04:38:15 +0100
Subject: [PATCH] bcrypt/tests: Add test for bugs in BCryptGetProperty.

View File

@ -1,4 +1,4 @@
From 2938bda81ec62e4cfee5b1af3ed4d218ce673eff Mon Sep 17 00:00:00 2001
From 65adbaee97870e85cab097ac3d6b2929d1d69ffd 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,18 +1,18 @@
From 882e1172fa4b2ad6f3746d8d3f1fa40eaa2cd40c Mon Sep 17 00:00:00 2001
From 53b662ae4f93b518e1e140f765c04b23a1fc10c7 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 | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
dlls/bcrypt/bcrypt_main.c | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index c064b63..b23e1ea 100644
index 72b5df2..c780976 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 *
@@ -510,15 +510,15 @@ static NTSTATUS generic_alg_property( enum alg_id id, const WCHAR *prop, UCHAR *
return STATUS_NOT_IMPLEMENTED;
}
@ -31,7 +31,7 @@ index c064b63..b23e1ea 100644
{
case ALG_ID_AES:
if (!strcmpW( prop, BCRYPT_BLOCK_LENGTH ))
@@ -566,11 +566,11 @@ static NTSTATUS get_alg_property( enum alg_id id, const WCHAR *prop, UCHAR *buf,
@@ -567,11 +567,11 @@ static NTSTATUS get_alg_property( enum alg_id id, const WCHAR *prop, UCHAR *buf,
return STATUS_NOT_IMPLEMENTED;
}
@ -45,7 +45,7 @@ index c064b63..b23e1ea 100644
if (status == STATUS_NOT_IMPLEMENTED)
FIXME( "unsupported property %s\n", debugstr_w(prop) );
return status;
@@ -590,12 +590,12 @@ NTSTATUS WINAPI BCryptGetProperty( BCRYPT_HANDLE handle, LPCWSTR prop, UCHAR *bu
@@ -591,12 +591,12 @@ NTSTATUS WINAPI BCryptGetProperty( BCRYPT_HANDLE handle, LPCWSTR prop, UCHAR *bu
case MAGIC_ALG:
{
const struct algorithm *alg = (const struct algorithm *)object;
@ -60,7 +60,7 @@ index c064b63..b23e1ea 100644
}
default:
WARN( "unknown magic %08x\n", object->magic );
@@ -768,7 +768,7 @@ NTSTATUS WINAPI BCryptHash( BCRYPT_ALG_HANDLE algorithm, UCHAR *secret, ULONG se
@@ -769,7 +769,7 @@ NTSTATUS WINAPI BCryptHash( BCRYPT_ALG_HANDLE algorithm, UCHAR *secret, ULONG se
}
#if defined(HAVE_GNUTLS_CIPHER_INIT) || defined(HAVE_COMMONCRYPTO_COMMONCRYPTOR_H) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
@ -69,7 +69,7 @@ index c064b63..b23e1ea 100644
{
ULONG ret = 0, size = sizeof(ret);
get_alg_property( alg, BCRYPT_BLOCK_LENGTH, (UCHAR *)&ret, sizeof(ret), &size );
@@ -787,27 +787,27 @@ struct key
@@ -788,27 +788,27 @@ struct key
ULONG secret_len;
};
@ -93,8 +93,9 @@ index c064b63..b23e1ea 100644
}
- if (!(key->block_size = get_block_size( id ))) return STATUS_INVALID_PARAMETER;
- if (!(buffer = heap_alloc( secret_len ))) return STATUS_NO_MEMORY;
+ if (!(key->block_size = get_block_size( alg ))) return STATUS_INVALID_PARAMETER;
if (!(buffer = HeapAlloc( GetProcessHeap(), 0, secret_len ))) return STATUS_NO_MEMORY;
+ if (!(buffer = heap_alloc( GetProcessHeap(), 0, secret_len ))) return STATUS_NO_MEMORY;
memcpy( buffer, secret, secret_len );
- key->alg_id = id;
@ -102,7 +103,7 @@ index c064b63..b23e1ea 100644
key->handle = 0; /* initialized on first use */
key->secret = buffer;
key->secret_len = secret_len;
@@ -1011,7 +1011,7 @@ struct key
@@ -1012,7 +1012,7 @@ struct key
ULONG block_size;
};
@ -111,14 +112,14 @@ index c064b63..b23e1ea 100644
{
ERR( "support for keys not available at build time\n" );
return STATUS_NOT_IMPLEMENTED;
@@ -1060,7 +1060,7 @@ NTSTATUS WINAPI BCryptGenerateSymmetricKey( BCRYPT_ALG_HANDLE algorithm, BCRYPT_
if (!(key = HeapAlloc( GetProcessHeap(), 0, sizeof(*key) ))) return STATUS_NO_MEMORY;
@@ -1061,7 +1061,7 @@ NTSTATUS WINAPI BCryptGenerateSymmetricKey( BCRYPT_ALG_HANDLE algorithm, BCRYPT_
if (!(key = heap_alloc( sizeof(*key) ))) return STATUS_NO_MEMORY;
key->hdr.magic = MAGIC_KEY;
- if ((status = key_init( key, alg->id, secret, secret_len )))
+ if ((status = key_init( key, alg, secret, secret_len )))
{
HeapFree( GetProcessHeap(), 0, key );
heap_free( key );
return status;
--
1.9.1

View File

@ -1,4 +1,4 @@
From b97cc4c8df55e42e30d7d241fe7db1f49f7e2bc5 Mon Sep 17 00:00:00 2001
From d5d11e2ada220c0bfcd11a9975ef4ef242254937 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: [PATCH] bcrypt: Implement BCryptSetProperty for algorithms.
@ -9,10 +9,10 @@ Subject: [PATCH] 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 b23e1ea..46e188f 100644
index c780976..190baca 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -191,6 +191,12 @@ enum alg_id
@@ -192,6 +192,12 @@ enum alg_id
ALG_ID_SHA512
};
@ -25,7 +25,7 @@ index b23e1ea..46e188f 100644
#define MAX_HASH_OUTPUT_BYTES 64
#define MAX_HASH_BLOCK_BITS 1024
@@ -215,6 +221,7 @@ struct algorithm
@@ -216,6 +222,7 @@ struct algorithm
{
struct object hdr;
enum alg_id id;
@ -33,15 +33,15 @@ index b23e1ea..46e188f 100644
BOOL hmac;
};
@@ -297,6 +304,7 @@ NTSTATUS WINAPI BCryptOpenAlgorithmProvider( BCRYPT_ALG_HANDLE *handle, LPCWSTR
if (!(alg = HeapAlloc( GetProcessHeap(), 0, sizeof(*alg) ))) return STATUS_NO_MEMORY;
@@ -298,6 +305,7 @@ NTSTATUS WINAPI BCryptOpenAlgorithmProvider( BCRYPT_ALG_HANDLE *handle, LPCWSTR
if (!(alg = heap_alloc( sizeof(*alg) ))) return STATUS_NO_MEMORY;
alg->hdr.magic = MAGIC_ALG;
alg->id = alg_id;
+ alg->mode = MODE_ID_CBC;
alg->hmac = flags & BCRYPT_ALG_HANDLE_HMAC_FLAG;
*handle = alg;
@@ -566,6 +574,40 @@ static NTSTATUS get_alg_property( const struct algorithm *alg, const WCHAR *prop
@@ -567,6 +575,40 @@ static NTSTATUS get_alg_property( const struct algorithm *alg, const WCHAR *prop
return STATUS_NOT_IMPLEMENTED;
}
@ -82,7 +82,7 @@ index b23e1ea..46e188f 100644
static NTSTATUS get_hash_property( const struct hash *hash, const WCHAR *prop, UCHAR *buf, ULONG size, ULONG *ret_size )
{
NTSTATUS status;
@@ -605,8 +647,28 @@ NTSTATUS WINAPI BCryptGetProperty( BCRYPT_HANDLE handle, LPCWSTR prop, UCHAR *bu
@@ -606,8 +648,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 )
{

View File

@ -1,4 +1,4 @@
From 66a2dae258c8a257f904e4235ce1e77451e40cc5 Mon Sep 17 00:00:00 2001
From a386ddc14722a35509d1f3a19c037fcb3ff1b465 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: [PATCH] bcrypt: Implement BCryptGetProperty for BCRYPT_CHAINING_MODE.
@ -9,10 +9,10 @@ Subject: [PATCH] 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 46e188f..714cb91 100644
index 190baca..4ffac3f 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -539,17 +539,18 @@ static NTSTATUS get_alg_property( const struct algorithm *alg, const WCHAR *prop
@@ -540,17 +540,18 @@ static NTSTATUS get_alg_property( const struct algorithm *alg, const WCHAR *prop
}
if (!strcmpW( prop, BCRYPT_CHAINING_MODE ))
{

View File

@ -1,4 +1,4 @@
From c5e9448e8fa27c7ff1ce7826f8ac15c8d825ac9e Mon Sep 17 00:00:00 2001
From 9ec7993211eab9a3a44bc326cdd7a2abed377b46 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: [PATCH] bcrypt: Implement BCryptGetProperty for
@ -10,10 +10,10 @@ Subject: [PATCH] bcrypt: Implement BCryptGetProperty for
2 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 714cb91..dc5a4f2 100644
index 4ffac3f..485a71e 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -565,6 +565,20 @@ static NTSTATUS get_alg_property( const struct algorithm *alg, const WCHAR *prop
@@ -566,6 +566,20 @@ static NTSTATUS get_alg_property( const struct algorithm *alg, const WCHAR *prop
}
return STATUS_SUCCESS;
}

View File

@ -1,4 +1,4 @@
From bd66e10e4141e514145c1be5444ae200919d7505 Mon Sep 17 00:00:00 2001
From df838a6fa3107044fd151f441148d768e408779e Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 26 Dec 2016 07:21:27 +0100
Subject: [PATCH] bcrypt: Fix string comparison in set_alg_property.
@ -9,10 +9,10 @@ Subject: [PATCH] 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 dc5a4f2..725c285 100644
index 485a71e..a903437 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -596,14 +596,12 @@ static NTSTATUS set_alg_property( struct algorithm *alg, const WCHAR *prop, UCHA
@@ -597,14 +597,12 @@ static NTSTATUS set_alg_property( struct algorithm *alg, const WCHAR *prop, UCHA
case ALG_ID_AES:
if (!strcmpW( prop, BCRYPT_CHAINING_MODE ))
{

View File

@ -1,4 +1,4 @@
From 143cf9efb5def04f854657b90d5c26847d6f72f9 Mon Sep 17 00:00:00 2001
From 0a0013fd0f077161a0975c2c83889bae85a37be0 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: [PATCH] bcrypt: Implement BCryptEncrypt for AES GCM mode.
@ -9,10 +9,10 @@ Subject: [PATCH] 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 725c285..b7e1957 100644
index a903437..381c11f 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -62,6 +62,12 @@ MAKE_FUNCPTR(gnutls_global_set_log_level);
@@ -63,6 +63,12 @@ MAKE_FUNCPTR(gnutls_global_set_log_level);
MAKE_FUNCPTR(gnutls_perror);
#undef MAKE_FUNCPTR
@ -25,7 +25,7 @@ index 725c285..b7e1957 100644
static void gnutls_log( int level, const char *msg )
{
TRACE( "<%d> %s", level, msg );
@@ -856,6 +862,7 @@ struct key
@@ -857,6 +863,7 @@ struct key
{
struct object hdr;
enum alg_id alg_id;
@ -33,7 +33,7 @@ index 725c285..b7e1957 100644
ULONG block_size;
gnutls_cipher_hd_t handle;
UCHAR *secret;
@@ -883,6 +890,7 @@ static NTSTATUS key_init( struct key *key, struct algorithm *alg, const UCHAR *s
@@ -884,6 +891,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 725c285..b7e1957 100644
key->handle = 0; /* initialized on first use */
key->secret = buffer;
key->secret_len = secret_len;
@@ -895,9 +903,13 @@ static gnutls_cipher_algorithm_t get_gnutls_cipher( const struct key *key )
@@ -896,9 +904,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 725c285..b7e1957 100644
default:
FIXME( "algorithm %u not supported\n", key->alg_id );
return GNUTLS_CIPHER_UNKNOWN;
@@ -1083,12 +1095,14 @@ static NTSTATUS key_destroy( struct key *key )
@@ -1084,12 +1096,14 @@ static NTSTATUS key_destroy( struct key *key )
struct key
{
struct object hdr;
@ -73,7 +73,7 @@ index 725c285..b7e1957 100644
return STATUS_NOT_IMPLEMENTED;
}
@@ -1168,17 +1182,37 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1169,17 +1183,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;

View File

@ -1,4 +1,4 @@
From dac0dade33e4623251bc8375fb39b3d0fdc5cead Mon Sep 17 00:00:00 2001
From 8391836c505c33c0f0671dde92585d53c4f2885c 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: [PATCH] bcrypt: Implement BCryptDecrypt for AES GCM mode.
@ -9,10 +9,10 @@ Subject: [PATCH] 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 b7e1957..c7298fb 100644
index 381c11f..28e3b30 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -1260,17 +1260,35 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1261,17 +1261,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;

View File

@ -1,4 +1,4 @@
From 87e8a5e0eeaab01ae5092be876b8d6195e19ed5b Mon Sep 17 00:00:00 2001
From 8a7e13f2942197a83e9f5b7b8bbbd7ef684bcd1a 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,10 +9,10 @@ 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 c7298fb..e7377f2 100644
index 28e3b30..12d61e8 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -49,6 +49,9 @@ static HINSTANCE instance;
@@ -50,6 +50,9 @@ static HINSTANCE instance;
#if defined(HAVE_GNUTLS_CIPHER_INIT) && !defined(HAVE_COMMONCRYPTO_COMMONCRYPTOR_H)
WINE_DECLARE_DEBUG_CHANNEL(winediag);
@ -22,7 +22,7 @@ index c7298fb..e7377f2 100644
static void *libgnutls_handle;
#define MAKE_FUNCPTR(f) static typeof(f) * p##f
MAKE_FUNCPTR(gnutls_cipher_decrypt2);
@@ -68,6 +71,11 @@ MAKE_FUNCPTR(gnutls_perror);
@@ -69,6 +72,11 @@ MAKE_FUNCPTR(gnutls_perror);
#define GNUTLS_CIPHER_AES_256_GCM 94
#endif
@ -34,7 +34,7 @@ index c7298fb..e7377f2 100644
static void gnutls_log( int level, const char *msg )
{
TRACE( "<%d> %s", level, msg );
@@ -101,6 +109,12 @@ static BOOL gnutls_initialize(void)
@@ -102,6 +110,12 @@ static BOOL gnutls_initialize(void)
LOAD_FUNCPTR(gnutls_perror)
#undef LOAD_FUNCPTR
@ -47,7 +47,7 @@ index c7298fb..e7377f2 100644
if ((ret = pgnutls_global_init()) != GNUTLS_E_SUCCESS)
{
pgnutls_perror( ret );
@@ -976,6 +990,19 @@ static NTSTATUS key_decrypt( struct key *key, const UCHAR *input, ULONG input_le
@@ -977,6 +991,19 @@ static NTSTATUS key_decrypt( struct key *key, const UCHAR *input, ULONG input_le
return STATUS_SUCCESS;
}
@ -67,7 +67,7 @@ index c7298fb..e7377f2 100644
static NTSTATUS key_destroy( struct key *key )
{
if (key->handle) pgnutls_cipher_deinit( key->handle );
@@ -1126,6 +1153,12 @@ static NTSTATUS key_decrypt( struct key *key, const UCHAR *input, ULONG input_le
@@ -1127,6 +1154,12 @@ static NTSTATUS key_decrypt( struct key *key, const UCHAR *input, ULONG input_le
return STATUS_NOT_IMPLEMENTED;
}
@ -80,7 +80,7 @@ index c7298fb..e7377f2 100644
static NTSTATUS key_destroy( struct key *key )
{
ERR( "support for keys not available at build time\n" );
@@ -1210,7 +1243,7 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1211,7 +1244,7 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
if ((status = key_encrypt( key, input, input_len, output, output_len )))
return status;
@ -89,7 +89,7 @@ index c7298fb..e7377f2 100644
}
if ((status = key_set_params( key, iv, iv_len ))) return status;
@@ -1269,6 +1302,7 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1270,6 +1303,7 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
if (key->mode == MODE_ID_GCM)
{
BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO *auth_info = padding;
@ -97,7 +97,7 @@ index c7298fb..e7377f2 100644
if (!auth_info) return STATUS_INVALID_PARAMETER;
if (!auth_info->pbNonce) return STATUS_INVALID_PARAMETER;
@@ -1286,6 +1320,11 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1287,6 +1321,11 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
if ((status = key_decrypt( key, input, input_len, output, output_len )))
return status;

View File

@ -1,4 +1,4 @@
From 2ee7e08d3f3da05d27ff004cac69aa136c93baf0 Mon Sep 17 00:00:00 2001
From 91c7e05a9845d2caad78e292774cffeb67b342ca 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: [PATCH] bcrypt: Implement BCryptDuplicateKey.
@ -23,10 +23,10 @@ index f00f55c..fcd0f6d 100644
@ stdcall BCryptEnumAlgorithms(long ptr ptr long)
@ stub BCryptEnumContextFunctionProviders
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index e7377f2..9b86812 100644
index 12d61e8..5591850 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -912,6 +912,24 @@ static NTSTATUS key_init( struct key *key, struct algorithm *alg, const UCHAR *s
@@ -913,6 +913,24 @@ static NTSTATUS key_init( struct key *key, struct algorithm *alg, const UCHAR *s
return STATUS_SUCCESS;
}
@ -51,7 +51,7 @@ index e7377f2..9b86812 100644
static gnutls_cipher_algorithm_t get_gnutls_cipher( const struct key *key )
{
switch (key->alg_id)
@@ -1133,6 +1151,13 @@ static NTSTATUS key_init( struct key *key, struct algorithm *alg, UCHAR *secret,
@@ -1134,6 +1152,13 @@ static NTSTATUS key_init( struct key *key, struct algorithm *alg, UCHAR *secret,
return STATUS_NOT_IMPLEMENTED;
}
@ -65,7 +65,7 @@ index e7377f2..9b86812 100644
static NTSTATUS key_set_params( struct key *key, UCHAR *iv, ULONG iv_len )
{
ERR( "support for keys not available at build time\n" );
@@ -1192,6 +1217,30 @@ NTSTATUS WINAPI BCryptGenerateSymmetricKey( BCRYPT_ALG_HANDLE algorithm, BCRYPT_
@@ -1193,6 +1218,30 @@ NTSTATUS WINAPI BCryptGenerateSymmetricKey( BCRYPT_ALG_HANDLE algorithm, BCRYPT_
return STATUS_SUCCESS;
}

View File

@ -1,4 +1,4 @@
From 436f61185069a5b28a5e1036ac47e985eaee1d0d Mon Sep 17 00:00:00 2001
From 2211b77a46bed8baf2e327aaa2809006f0776717 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 26 Dec 2016 08:30:43 +0100
Subject: [PATCH] bcrypt/tests: Add tests for BCryptDuplicateKey.

View File

@ -1,4 +1,4 @@
From 0143046b208f307d961e0f2a443c28b6d4459836 Mon Sep 17 00:00:00 2001
From 2b1715f4d088c7281cd0d97281635ea47fe24124 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: [PATCH] bcrypt: Allow to call BCryptSetProperty on key objects.
@ -9,10 +9,10 @@ Subject: [PATCH] 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 9b86812..a7e7afc 100644
index 5591850..2bb8f8f 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -245,6 +245,9 @@ struct algorithm
@@ -246,6 +246,9 @@ struct algorithm
BOOL hmac;
};
@ -22,7 +22,7 @@ index 9b86812..a7e7afc 100644
NTSTATUS WINAPI BCryptGenRandom(BCRYPT_ALG_HANDLE handle, UCHAR *buffer, ULONG count, ULONG flags)
{
const DWORD supported_flags = BCRYPT_USE_SYSTEM_PREFERRED_RNG;
@@ -695,8 +698,8 @@ NTSTATUS WINAPI BCryptSetProperty( BCRYPT_HANDLE handle, const WCHAR *prop, UCHA
@@ -696,8 +699,8 @@ NTSTATUS WINAPI BCryptSetProperty( BCRYPT_HANDLE handle, const WCHAR *prop, UCHA
}
case MAGIC_KEY:
{
@ -33,7 +33,7 @@ index 9b86812..a7e7afc 100644
}
default:
WARN( "unknown magic %08x\n", object->magic );
@@ -930,6 +933,31 @@ static NTSTATUS key_duplicate( struct key *key_orig, struct key *key_copy )
@@ -931,6 +934,31 @@ static NTSTATUS key_duplicate( struct key *key_orig, struct key *key_copy )
return STATUS_SUCCESS;
}
@ -65,7 +65,7 @@ index 9b86812..a7e7afc 100644
static gnutls_cipher_algorithm_t get_gnutls_cipher( const struct key *key )
{
switch (key->alg_id)
@@ -1158,6 +1186,12 @@ static NTSTATUS key_duplicate( struct key *key_orig, struct key *key_copy )
@@ -1159,6 +1187,12 @@ static NTSTATUS key_duplicate( struct key *key_orig, struct key *key_copy )
return STATUS_NOT_IMPLEMENTED;
}

View File

@ -1,4 +1,4 @@
From c17ad9aa3225c31f132e1bf20da65ca36ae396e8 Mon Sep 17 00:00:00 2001
From 47242ae4cb2f6bd7ffbf5eb9ae22a354916147c6 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: [PATCH] bcrypt: Add support for auth data in AES GCM mode.
@ -8,10 +8,10 @@ Subject: [PATCH] bcrypt: Add support for auth data in AES GCM mode.
1 file changed, 36 insertions(+), 2 deletions(-)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index a7e7afc..0dc0645 100644
index 2bb8f8f..117e351 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -50,7 +50,8 @@ static HINSTANCE instance;
@@ -51,7 +51,8 @@ static HINSTANCE instance;
WINE_DECLARE_DEBUG_CHANNEL(winediag);
/* Not present in gnutls version < 3.0 */
@ -21,7 +21,7 @@ index a7e7afc..0dc0645 100644
static void *libgnutls_handle;
#define MAKE_FUNCPTR(f) static typeof(f) * p##f
@@ -71,7 +72,12 @@ MAKE_FUNCPTR(gnutls_perror);
@@ -72,7 +73,12 @@ MAKE_FUNCPTR(gnutls_perror);
#define GNUTLS_CIPHER_AES_256_GCM 94
#endif
@ -35,7 +35,7 @@ index a7e7afc..0dc0645 100644
{
return GNUTLS_E_UNKNOWN_CIPHER_TYPE;
}
@@ -114,6 +120,11 @@ static BOOL gnutls_initialize(void)
@@ -115,6 +121,11 @@ static BOOL gnutls_initialize(void)
WARN("gnutls_cipher_tag not found\n");
pgnutls_cipher_tag = compat_gnutls_cipher_tag;
}
@ -47,7 +47,7 @@ index a7e7afc..0dc0645 100644
if ((ret = pgnutls_global_init()) != GNUTLS_E_SUCCESS)
{
@@ -1008,6 +1019,19 @@ static NTSTATUS key_set_params( struct key *key, UCHAR *iv, ULONG iv_len )
@@ -1009,6 +1020,19 @@ static NTSTATUS key_set_params( struct key *key, UCHAR *iv, ULONG iv_len )
return STATUS_SUCCESS;
}
@ -67,7 +67,7 @@ index a7e7afc..0dc0645 100644
static NTSTATUS key_encrypt( struct key *key, const UCHAR *input, ULONG input_len, UCHAR *output,
ULONG output_len )
{
@@ -1198,6 +1222,12 @@ static NTSTATUS key_set_params( struct key *key, UCHAR *iv, ULONG iv_len )
@@ -1199,6 +1223,12 @@ static NTSTATUS key_set_params( struct key *key, UCHAR *iv, ULONG iv_len )
return STATUS_NOT_IMPLEMENTED;
}
@ -80,7 +80,7 @@ index a7e7afc..0dc0645 100644
static NTSTATUS key_encrypt( struct key *key, const UCHAR *input, ULONG input_len, UCHAR *output,
ULONG output_len )
{
@@ -1323,6 +1353,8 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1324,6 +1354,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 a7e7afc..0dc0645 100644
if ((status = key_encrypt( key, input, input_len, output, output_len )))
return status;
@@ -1400,6 +1432,8 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1401,6 +1433,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;

View File

@ -1,4 +1,4 @@
From a03acf90d2f3803b3fb923d2ab337abfa9421a78 Mon Sep 17 00:00:00 2001
From 04ad5960981996bdf3c9f14e40da3a9044e55b60 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 26 Dec 2016 15:01:38 +0100
Subject: [PATCH] bcrypt/tests: Add tests for auth data in AES GCM mode.

View File

@ -1,37 +1,38 @@
From be6a7cd60499a83baff70922b253c477401b76b9 Mon Sep 17 00:00:00 2001
From 02d978a02918d24f9b7dd502a560081a9ce1c980 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 26 Dec 2016 16:20:57 +0100
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(-)
dlls/bcrypt/bcrypt_main.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 0dc0645..036a92d 100644
index 117e351..d17224c 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -1268,12 +1268,17 @@ NTSTATUS WINAPI BCryptGenerateSymmetricKey( BCRYPT_ALG_HANDLE algorithm, BCRYPT_
@@ -1269,12 +1269,19 @@ 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" );
- if (!(key = HeapAlloc( GetProcessHeap(), 0, sizeof(*key) ))) return STATUS_NO_MEMORY;
+ if (!(key = HeapAlloc( GetProcessHeap(), 0, sizeof(*key) )))
+
if (!(key = heap_alloc( sizeof(*key) ))) return STATUS_NO_MEMORY;
+ {
+ *handle = NULL;
+ return STATUS_NO_MEMORY;
+ }
+
key->hdr.magic = MAGIC_KEY;
if ((status = key_init( key, alg, secret, secret_len )))
{
HeapFree( GetProcessHeap(), 0, key );
heap_free( key );
+ *handle = NULL;
return status;
}
@@ -1293,11 +1298,15 @@ NTSTATUS WINAPI BCryptDuplicateKey( BCRYPT_KEY_HANDLE handle, BCRYPT_KEY_HANDLE
@@ -1294,11 +1301,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) )))

View File

@ -1,4 +1,4 @@
From 5c5e35a8418c64ee5b79ffc96b81d66e0b12c743 Mon Sep 17 00:00:00 2001
From f7a292fc7e53b5d2300b68e2e3234fad3eb80c57 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 5 Mar 2017 23:18:03 +0100
Subject: [PATCH] bcrypt: Implement support for ECB chain mode.
@ -9,10 +9,10 @@ Subject: [PATCH] bcrypt: Implement support for ECB chain mode.
2 files changed, 244 insertions(+), 9 deletions(-)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 036a92d..a471d51 100644
index d17224c..420f668 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -224,6 +224,7 @@ enum alg_id
@@ -225,6 +225,7 @@ enum alg_id
enum mode_id
{
@ -20,7 +20,7 @@ index 036a92d..a471d51 100644
MODE_ID_CBC,
MODE_ID_GCM
};
@@ -576,8 +577,9 @@ static NTSTATUS get_alg_property( const struct algorithm *alg, const WCHAR *prop
@@ -577,8 +578,9 @@ static NTSTATUS get_alg_property( const struct algorithm *alg, const WCHAR *prop
const WCHAR *mode;
switch (alg->mode)
{
@ -31,7 +31,7 @@ index 036a92d..a471d51 100644
default: return STATUS_NOT_IMPLEMENTED;
}
@@ -630,7 +632,12 @@ static NTSTATUS set_alg_property( struct algorithm *alg, const WCHAR *prop, UCHA
@@ -631,7 +633,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 036a92d..a471d51 100644
{
alg->mode = MODE_ID_CBC;
return STATUS_SUCCESS;
@@ -948,7 +955,12 @@ static NTSTATUS set_key_property( struct key *key, const WCHAR *prop, UCHAR *val
@@ -949,7 +956,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 036a92d..a471d51 100644
{
key->mode = MODE_ID_CBC;
return STATUS_SUCCESS;
@@ -978,6 +990,7 @@ static gnutls_cipher_algorithm_t get_gnutls_cipher( const struct key *key )
@@ -979,6 +991,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 036a92d..a471d51 100644
case MODE_ID_CBC:
default: return GNUTLS_CIPHER_AES_128_CBC;
}
@@ -989,6 +1002,7 @@ static gnutls_cipher_algorithm_t get_gnutls_cipher( const struct key *key )
@@ -990,6 +1003,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 036a92d..a471d51 100644
gnutls_cipher_algorithm_t cipher;
gnutls_datum_t secret, vector;
int ret;
@@ -1002,15 +1016,18 @@ static NTSTATUS key_set_params( struct key *key, UCHAR *iv, ULONG iv_len )
@@ -1003,15 +1017,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 036a92d..a471d51 100644
{
pgnutls_perror( ret );
return STATUS_INTERNAL_ERROR;
@@ -1382,11 +1399,15 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1385,11 +1402,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 036a92d..a471d51 100644
bytes_left -= key->block_size;
src += key->block_size;
dst += key->block_size;
@@ -1469,11 +1490,15 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1472,11 +1493,15 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
else if (output_len < *ret_len)
return STATUS_BUFFER_TOO_SMALL;

View File

@ -1,4 +1,4 @@
From 5ed0e3dc801a79e8a187c1006e4b829427814135 Mon Sep 17 00:00:00 2001
From d517939ffb93bd49d13376770b1b270f9338b2ee Mon Sep 17 00:00:00 2001
From: Andrew Wesie <awesie@gmail.com>
Date: Mon, 1 May 2017 22:57:43 -0500
Subject: [PATCH] bcrypt: Fix BCryptEncrypt with AES_GCM and no input and no
@ -11,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 a471d51..d985337 100644
index 420f668..005c98d 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -1376,7 +1376,7 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1379,7 +1379,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;

View File

@ -1,4 +1,4 @@
From 8dec986ed00a13f49022bedd5b63c1b9343a9709 Mon Sep 17 00:00:00 2001
From e0684348c300573e6729ce235fce2f49a1760f29 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,10 +35,10 @@ 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 d985337..46e7ab1 100644
index 005c98d..bfe4708 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 )
@@ -1091,6 +1091,13 @@ static NTSTATUS key_get_tag( struct key *key, UCHAR *tag, ULONG len )
return STATUS_SUCCESS;
}
@ -52,7 +52,7 @@ index d985337..46e7ab1 100644
static NTSTATUS key_destroy( struct key *key )
{
if (key->handle) pgnutls_cipher_deinit( key->handle );
@@ -1265,6 +1272,12 @@ static NTSTATUS key_get_tag( struct key *key, UCHAR *tag, ULONG len )
@@ -1266,6 +1273,12 @@ static NTSTATUS key_get_tag( struct key *key, UCHAR *tag, ULONG len )
return STATUS_NOT_IMPLEMENTED;
}
@ -65,7 +65,7 @@ index d985337..46e7ab1 100644
static NTSTATUS key_destroy( struct key *key )
{
ERR( "support for keys not available at build time\n" );
@@ -1331,6 +1344,94 @@ NTSTATUS WINAPI BCryptDuplicateKey( BCRYPT_KEY_HANDLE handle, BCRYPT_KEY_HANDLE
@@ -1334,6 +1347,94 @@ NTSTATUS WINAPI BCryptDuplicateKey( BCRYPT_KEY_HANDLE handle, BCRYPT_KEY_HANDLE
return STATUS_SUCCESS;
}

View File

@ -1,4 +1,4 @@
From 34937c9def50791d3588c4b618df284de5ecc8e8 Mon Sep 17 00:00:00 2001
From 9f5728e55070f4e5d5ad91a06f6837c1513c2917 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: [PATCH] bcrypt: Add support for 192 and 256 bit aes keys.
@ -9,10 +9,10 @@ Subject: [PATCH] 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 46e7ab1..0c07c1f 100644
index bfe4708..2cd1271 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -989,11 +989,21 @@ static gnutls_cipher_algorithm_t get_gnutls_cipher( const struct key *key )
@@ -990,11 +990,21 @@ static gnutls_cipher_algorithm_t get_gnutls_cipher( const struct key *key )
WARN( "handle block size\n" );
switch (key->mode)
{

View File

@ -1,17 +1,17 @@
From ae76b1d04b4c6b2fafce2a9fcef3e1dfdecc4fcc Mon Sep 17 00:00:00 2001
From c720c7cffa486b64b860822e765fb7818c2c2081 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 | 313 ++++++++++++++++++++++++++++++----------------
1 file changed, 205 insertions(+), 108 deletions(-)
dlls/bcrypt/bcrypt_main.c | 316 ++++++++++++++++++++++++++++++----------------
1 file changed, 207 insertions(+), 109 deletions(-)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 0c07c1f..1d5d873 100644
index 2cd1271..7eca112 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -237,16 +237,17 @@ static const struct {
@@ -238,16 +238,17 @@ static const struct {
ULONG hash_length;
ULONG block_bits;
const WCHAR *alg_name;
@ -38,7 +38,7 @@ index 0c07c1f..1d5d873 100644
};
struct algorithm
@@ -893,10 +894,8 @@ static ULONG get_block_size( struct algorithm *alg )
@@ -894,10 +895,8 @@ static ULONG get_block_size( struct algorithm *alg )
#endif
#if defined(HAVE_GNUTLS_CIPHER_INIT) && !defined(HAVE_COMMONCRYPTO_COMMONCRYPTOR_H)
@ -50,7 +50,7 @@ index 0c07c1f..1d5d873 100644
enum mode_id mode;
ULONG block_size;
gnutls_cipher_hd_t handle;
@@ -904,7 +903,17 @@ struct key
@@ -905,7 +904,17 @@ struct key
ULONG secret_len;
};
@ -69,13 +69,14 @@ index 0c07c1f..1d5d873 100644
{
UCHAR *buffer;
@@ -920,34 +929,64 @@ static NTSTATUS key_init( struct key *key, struct algorithm *alg, const UCHAR *s
@@ -921,34 +930,64 @@ static NTSTATUS key_init( struct key *key, struct algorithm *alg, const UCHAR *s
return STATUS_NOT_SUPPORTED;
}
- if (!(key->block_size = get_block_size( alg ))) return STATUS_INVALID_PARAMETER;
- if (!(buffer = heap_alloc( GetProcessHeap(), 0, secret_len ))) return STATUS_NO_MEMORY;
+ if (!(key->u.s.block_size = get_block_size( alg ))) return STATUS_INVALID_PARAMETER;
if (!(buffer = HeapAlloc( GetProcessHeap(), 0, secret_len ))) return STATUS_NO_MEMORY;
+ if (!(buffer = heap_alloc( secret_len ))) return STATUS_NO_MEMORY;
memcpy( buffer, secret, secret_len );
- key->alg_id = alg->id;
@ -148,7 +149,7 @@ index 0c07c1f..1d5d873 100644
return STATUS_SUCCESS;
}
@@ -955,19 +994,22 @@ static NTSTATUS set_key_property( struct key *key, const WCHAR *prop, UCHAR *val
@@ -956,19 +995,22 @@ static NTSTATUS set_key_property( struct key *key, const WCHAR *prop, UCHAR *val
{
if (!strcmpW( prop, BCRYPT_CHAINING_MODE ))
{
@ -174,7 +175,7 @@ index 0c07c1f..1d5d873 100644
return STATUS_SUCCESS;
}
else
@@ -987,22 +1029,22 @@ static gnutls_cipher_algorithm_t get_gnutls_cipher( const struct key *key )
@@ -988,22 +1030,22 @@ static gnutls_cipher_algorithm_t get_gnutls_cipher( const struct key *key )
{
case ALG_ID_AES:
WARN( "handle block size\n" );
@ -204,7 +205,7 @@ index 0c07c1f..1d5d873 100644
return GNUTLS_CIPHER_UNKNOWN;
default:
FIXME( "algorithm %u not supported\n", key->alg_id );
@@ -1010,17 +1052,17 @@ static gnutls_cipher_algorithm_t get_gnutls_cipher( const struct key *key )
@@ -1011,17 +1053,17 @@ static gnutls_cipher_algorithm_t get_gnutls_cipher( const struct key *key )
}
}
@ -226,7 +227,7 @@ index 0c07c1f..1d5d873 100644
}
if ((cipher = get_gnutls_cipher( key )) == GNUTLS_CIPHER_UNKNOWN)
@@ -1032,12 +1074,12 @@ static NTSTATUS key_set_params( struct key *key, UCHAR *iv, ULONG iv_len )
@@ -1033,12 +1075,12 @@ static NTSTATUS key_set_params( struct key *key, UCHAR *iv, ULONG iv_len )
iv_len = sizeof(zero_iv);
}
@ -242,7 +243,7 @@ index 0c07c1f..1d5d873 100644
{
pgnutls_perror( ret );
return STATUS_INTERNAL_ERROR;
@@ -1046,11 +1088,11 @@ static NTSTATUS key_set_params( struct key *key, UCHAR *iv, ULONG iv_len )
@@ -1047,11 +1089,11 @@ static NTSTATUS key_set_params( struct key *key, UCHAR *iv, ULONG iv_len )
return STATUS_SUCCESS;
}
@ -252,11 +253,11 @@ index 0c07c1f..1d5d873 100644
int ret;
- if ((ret = pgnutls_cipher_add_auth( key->handle, auth_data, len )))
+ if ((ret = pgnutls_cipher_add_auth( key->u.s.handle, auth_data, len )))
+ if ((ret = pgnutls_cipher_add_auth( key->u.s.handle , auth_data, len )))
{
pgnutls_perror( ret );
return STATUS_INTERNAL_ERROR;
@@ -1059,12 +1101,12 @@ static NTSTATUS key_set_auth_data( struct key *key, UCHAR *auth_data, ULONG len
@@ -1060,12 +1102,12 @@ static NTSTATUS key_set_auth_data( struct key *key, UCHAR *auth_data, ULONG len
return STATUS_SUCCESS;
}
@ -271,7 +272,7 @@ index 0c07c1f..1d5d873 100644
{
pgnutls_perror( ret );
return STATUS_INTERNAL_ERROR;
@@ -1073,12 +1115,12 @@ static NTSTATUS key_encrypt( struct key *key, const UCHAR *input, ULONG input_le
@@ -1074,12 +1116,12 @@ static NTSTATUS key_encrypt( struct key *key, const UCHAR *input, ULONG input_le
return STATUS_SUCCESS;
}
@ -286,7 +287,7 @@ index 0c07c1f..1d5d873 100644
{
pgnutls_perror( ret );
return STATUS_INTERNAL_ERROR;
@@ -1087,11 +1129,11 @@ static NTSTATUS key_decrypt( struct key *key, const UCHAR *input, ULONG input_le
@@ -1088,11 +1130,11 @@ static NTSTATUS key_decrypt( struct key *key, const UCHAR *input, ULONG input_le
return STATUS_SUCCESS;
}
@ -300,7 +301,7 @@ index 0c07c1f..1d5d873 100644
{
pgnutls_perror( ret );
return STATUS_INTERNAL_ERROR;
@@ -1100,17 +1142,20 @@ static NTSTATUS key_get_tag( struct key *key, UCHAR *tag, ULONG len )
@@ -1101,18 +1143,22 @@ static NTSTATUS key_get_tag( struct key *key, UCHAR *tag, ULONG len )
return STATUS_SUCCESS;
}
@ -317,16 +318,18 @@ index 0c07c1f..1d5d873 100644
static NTSTATUS key_destroy( struct key *key )
{
- if (key->handle) pgnutls_cipher_deinit( key->handle );
- HeapFree( GetProcessHeap(), 0, key->secret );
- heap_free( key->secret );
+ if (key_is_symmetric(key))
+ {
+ if (key->u.s.handle) pgnutls_cipher_deinit( key->u.s.handle );
+ HeapFree( GetProcessHeap(), 0, key->u.s.secret );
+ heap_free( key->u.s.secret );
+ }
HeapFree( GetProcessHeap(), 0, key );
heap_free( key );
+
return STATUS_SUCCESS;
}
@@ -1230,59 +1275,80 @@ struct key
#elif defined(HAVE_COMMONCRYPTO_COMMONCRYPTOR_H) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
@@ -1231,59 +1277,80 @@ struct key
ULONG block_size;
};
@ -416,16 +419,16 @@ index 0c07c1f..1d5d873 100644
{
ERR( "support for keys not available at build time\n" );
return STATUS_NOT_IMPLEMENTED;
@@ -1315,7 +1381,7 @@ NTSTATUS WINAPI BCryptGenerateSymmetricKey( BCRYPT_ALG_HANDLE algorithm, BCRYPT_
}
@@ -1318,7 +1385,7 @@ NTSTATUS WINAPI BCryptGenerateSymmetricKey( BCRYPT_ALG_HANDLE algorithm, BCRYPT_
key->hdr.magic = MAGIC_KEY;
- if ((status = key_init( key, alg, secret, secret_len )))
+ if ((status = key_symmetric_init( key, alg, secret, secret_len )))
{
HeapFree( GetProcessHeap(), 0, key );
heap_free( key );
*handle = NULL;
@@ -1412,13 +1478,19 @@ NTSTATUS WINAPI BCryptExportKey( BCRYPT_KEY_HANDLE export_key, BCRYPT_KEY_HANDLE
@@ -1415,13 +1482,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;
@ -446,7 +449,7 @@ index 0c07c1f..1d5d873 100644
return status;
if (!strcmpW( type, BCRYPT_KEY_DATA_BLOB ))
@@ -1459,19 +1531,30 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1462,19 +1535,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;
@ -478,7 +481,7 @@ index 0c07c1f..1d5d873 100644
{
BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO *auth_info = padding;
@@ -1482,7 +1565,7 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1485,7 +1569,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" );
@ -487,7 +490,7 @@ index 0c07c1f..1d5d873 100644
return status;
*ret_len = input_len;
@@ -1490,46 +1573,48 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1493,46 +1577,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;
@ -542,17 +545,17 @@ index 0c07c1f..1d5d873 100644
if (flags & BCRYPT_BLOCK_PADDING)
{
- if (!(buf = HeapAlloc( GetProcessHeap(), 0, key->block_size ))) return STATUS_NO_MEMORY;
+ if (!(buf = HeapAlloc( GetProcessHeap(), 0, block_size ))) return STATUS_NO_MEMORY;
- if (!(buf = heap_alloc( key->block_size ))) return STATUS_NO_MEMORY;
+ if (!(buf = heap_alloc( block_size ))) return STATUS_NO_MEMORY;
memcpy( buf, src, bytes_left );
- memset( buf + bytes_left, key->block_size - bytes_left, key->block_size - bytes_left );
- status = key_encrypt( key, buf, key->block_size, dst, key->block_size );
+ memset( buf + bytes_left, block_size - bytes_left, block_size - bytes_left );
+ status = key_symmetric_encrypt( key, buf, block_size, dst, block_size );
HeapFree( GetProcessHeap(), 0, buf );
heap_free( buf );
}
@@ -1543,19 +1628,30 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1546,19 +1632,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;
@ -584,7 +587,7 @@ index 0c07c1f..1d5d873 100644
{
BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO *auth_info = padding;
UCHAR tag[16];
@@ -1565,7 +1661,7 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1568,7 +1665,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;
@ -593,7 +596,7 @@ index 0c07c1f..1d5d873 100644
return status;
*ret_len = input_len;
@@ -1573,12 +1669,12 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1576,12 +1673,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;
@ -609,7 +612,7 @@ index 0c07c1f..1d5d873 100644
return status;
if (memcmp( tag, auth_info->pbTag, auth_info->cbTag ))
return STATUS_AUTH_TAG_MISMATCH;
@@ -1586,44 +1682,45 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
@@ -1589,44 +1686,45 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
return STATUS_SUCCESS;
}
@ -657,10 +660,10 @@ index 0c07c1f..1d5d873 100644
if (flags & BCRYPT_BLOCK_PADDING)
{
- if (!(buf = HeapAlloc( GetProcessHeap(), 0, key->block_size ))) return STATUS_NO_MEMORY;
- if (!(buf = heap_alloc( key->block_size ))) return STATUS_NO_MEMORY;
- status = key_decrypt( key, src, key->block_size, buf, key->block_size );
- if (!status && buf[ key->block_size - 1 ] <= key->block_size)
+ if (!(buf = HeapAlloc( GetProcessHeap(), 0, block_size ))) return STATUS_NO_MEMORY;
+ if (!(buf = heap_alloc( block_size ))) return STATUS_NO_MEMORY;
+ status = key_symmetric_decrypt( key, src, block_size, buf, block_size );
+ if (!status && buf[ block_size - 1 ] <= block_size)
{

View File

@ -1,4 +1,4 @@
From 108e7d128d29d8666ab3818234d81d4c98a6b15f Mon Sep 17 00:00:00 2001
From 3dc66c17df931e50e8cb639307e0d53db5039d1f 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: [PATCH] include: Add ecdsa and asymmetric key related bcrypt

View File

@ -1,4 +1,4 @@
From 00f07aee7bf6ac092d9e1d57ef649e4cb6ae181d Mon Sep 17 00:00:00 2001
From 5dfa33fabba4065c5d6a15736d4253e31baa6261 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: [PATCH] bcrypt/tests: Add basic test for ecdsa.
@ -8,7 +8,7 @@ Subject: [PATCH] bcrypt/tests: Add basic test for ecdsa.
1 file changed, 65 insertions(+)
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index 396f553..699d6aa 100644
index e4c9ea0..b506d9e 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -50,6 +50,8 @@ static NTSTATUS (WINAPI *pBCryptDestroyKey)(BCRYPT_KEY_HANDLE);

View File

@ -1,4 +1,4 @@
From 7b164e4ffcf6cc466540bd348afa55d2c0bcf611 Mon Sep 17 00:00:00 2001
From eba8c4fffe792b267e4e6b527c68b7cf51600910 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,10 +33,10 @@ index 28c2394..78824d7 100644
@ stub GetCipherInterface
@ stub GetHashInterface
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 1d5d873..18976aa 100644
index 7eca112..2c40ac9 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -219,7 +219,9 @@ enum alg_id
@@ -220,7 +220,9 @@ enum alg_id
ALG_ID_SHA1,
ALG_ID_SHA256,
ALG_ID_SHA384,
@ -47,7 +47,7 @@ index 1d5d873..18976aa 100644
};
enum mode_id
@@ -247,7 +249,9 @@ static const struct {
@@ -248,7 +250,9 @@ static const struct {
/* ALG_ID_SHA1 */ { 278, 20, 512, BCRYPT_SHA1_ALGORITHM, FALSE },
/* ALG_ID_SHA256 */ { 286, 32, 512, BCRYPT_SHA256_ALGORITHM, FALSE },
/* ALG_ID_SHA384 */ { 382, 48, 1024, BCRYPT_SHA384_ALGORITHM, FALSE },
@ -58,7 +58,7 @@ index 1d5d873..18976aa 100644
};
struct algorithm
@@ -326,6 +330,8 @@ NTSTATUS WINAPI BCryptOpenAlgorithmProvider( BCRYPT_ALG_HANDLE *handle, LPCWSTR
@@ -327,6 +331,8 @@ NTSTATUS WINAPI BCryptOpenAlgorithmProvider( BCRYPT_ALG_HANDLE *handle, LPCWSTR
else if (!strcmpW( id, BCRYPT_SHA256_ALGORITHM )) alg_id = ALG_ID_SHA256;
else if (!strcmpW( id, BCRYPT_SHA384_ALGORITHM )) alg_id = ALG_ID_SHA384;
else if (!strcmpW( id, BCRYPT_SHA512_ALGORITHM )) alg_id = ALG_ID_SHA512;
@ -67,7 +67,7 @@ index 1d5d873..18976aa 100644
else
{
FIXME( "algorithm %s not supported\n", debugstr_w(id) );
@@ -903,6 +909,12 @@ struct key_symmetric
@@ -904,6 +910,12 @@ struct key_symmetric
ULONG secret_len;
};
@ -80,7 +80,7 @@ index 1d5d873..18976aa 100644
struct key
{
struct object hdr;
@@ -910,6 +922,7 @@ struct key
@@ -911,6 +923,7 @@ struct key
union
{
struct key_symmetric s;
@ -88,7 +88,7 @@ index 1d5d873..18976aa 100644
} u;
};
@@ -942,6 +955,33 @@ static NTSTATUS key_symmetric_init( struct key *key, struct algorithm *alg, cons
@@ -943,6 +956,33 @@ static NTSTATUS key_symmetric_init( struct key *key, struct algorithm *alg, cons
return STATUS_SUCCESS;
}
@ -122,7 +122,7 @@ index 1d5d873..18976aa 100644
static inline BOOL key_is_symmetric( struct key *key )
{
return alg_props[key->alg_id].symmetric;
@@ -974,7 +1014,13 @@ static NTSTATUS key_duplicate( struct key *key_orig, struct key *key_copy )
@@ -975,7 +1015,13 @@ static NTSTATUS key_duplicate( struct key *key_orig, struct key *key_copy )
}
else
{
@ -137,18 +137,18 @@ index 1d5d873..18976aa 100644
}
}
@@ -1156,6 +1202,10 @@ static NTSTATUS key_destroy( struct key *key )
@@ -1157,6 +1203,10 @@ static NTSTATUS key_destroy( struct key *key )
if (key->u.s.handle) pgnutls_cipher_deinit( key->u.s.handle );
HeapFree( GetProcessHeap(), 0, key->u.s.secret );
heap_free( key->u.s.secret );
}
+ else
+ {
+ HeapFree( GetProcessHeap(), 0, key->u.a.pubkey );
+ heap_free( key->u.a.pubkey );
+ }
HeapFree( GetProcessHeap(), 0, key );
heap_free( key );
return STATUS_SUCCESS;
}
@@ -1292,6 +1342,12 @@ static NTSTATUS key_symmetric_init( struct key *key, struct algorithm *alg, UCHA
@@ -1294,6 +1344,12 @@ static NTSTATUS key_symmetric_init( struct key *key, struct algorithm *alg, UCHA
return STATUS_NOT_IMPLEMENTED;
}
@ -161,7 +161,7 @@ index 1d5d873..18976aa 100644
static NTSTATUS key_duplicate( struct key *key_orig, struct key *key_copy )
{
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
@@ -1518,6 +1574,88 @@ NTSTATUS WINAPI BCryptExportKey( BCRYPT_KEY_HANDLE export_key, BCRYPT_KEY_HANDLE
return STATUS_INVALID_PARAMETER;
}
@ -251,7 +251,7 @@ index 1d5d873..18976aa 100644
{
struct key *key = handle;
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index 699d6aa..fe57274 100644
index b506d9e..c143ea7 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -1399,7 +1399,7 @@ static void test_ECDSA(void)

View File

@ -1,4 +1,4 @@
From 0a88b987dc3a1293f0ca94b661cc96653abfe132 Mon Sep 17 00:00:00 2001
From 55060223c611c8091c7a248e978966bb8ee3f57b 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 18976aa..d6e6bb7 100644
index 2c40ac9..17fb3fe 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -27,6 +27,7 @@
@ -20,7 +20,7 @@ index 18976aa..d6e6bb7 100644
#endif
#include "ntstatus.h"
@@ -49,9 +50,26 @@ static HINSTANCE instance;
@@ -50,9 +51,26 @@ static HINSTANCE instance;
#if defined(HAVE_GNUTLS_CIPHER_INIT) && !defined(HAVE_COMMONCRYPTO_COMMONCRYPTOR_H)
WINE_DECLARE_DEBUG_CHANNEL(winediag);
@ -47,7 +47,7 @@ index 18976aa..d6e6bb7 100644
static void *libgnutls_handle;
#define MAKE_FUNCPTR(f) static typeof(f) * p##f
@@ -64,12 +82,15 @@ MAKE_FUNCPTR(gnutls_global_init);
@@ -65,12 +83,15 @@ MAKE_FUNCPTR(gnutls_global_init);
MAKE_FUNCPTR(gnutls_global_set_log_function);
MAKE_FUNCPTR(gnutls_global_set_log_level);
MAKE_FUNCPTR(gnutls_perror);
@ -63,7 +63,7 @@ index 18976aa..d6e6bb7 100644
#endif
static int compat_gnutls_cipher_tag(gnutls_cipher_hd_t handle, void *tag, size_t tag_size)
@@ -82,6 +103,24 @@ static int compat_gnutls_cipher_add_auth(gnutls_cipher_hd_t handle, const void *
@@ -83,6 +104,24 @@ static int compat_gnutls_cipher_add_auth(gnutls_cipher_hd_t handle, const void *
return GNUTLS_E_UNKNOWN_CIPHER_TYPE;
}
@ -88,7 +88,7 @@ index 18976aa..d6e6bb7 100644
static void gnutls_log( int level, const char *msg )
{
TRACE( "<%d> %s", level, msg );
@@ -113,6 +152,8 @@ static BOOL gnutls_initialize(void)
@@ -114,6 +153,8 @@ static BOOL gnutls_initialize(void)
LOAD_FUNCPTR(gnutls_global_set_log_function)
LOAD_FUNCPTR(gnutls_global_set_log_level)
LOAD_FUNCPTR(gnutls_perror)
@ -97,7 +97,7 @@ index 18976aa..d6e6bb7 100644
#undef LOAD_FUNCPTR
if (!(pgnutls_cipher_tag = wine_dlsym( libgnutls_handle, "gnutls_cipher_tag", NULL, 0 )))
@@ -125,6 +166,21 @@ static BOOL gnutls_initialize(void)
@@ -126,6 +167,21 @@ static BOOL gnutls_initialize(void)
WARN("gnutls_cipher_add_auth not found\n");
pgnutls_cipher_add_auth = compat_gnutls_cipher_add_auth;
}
@ -119,7 +119,7 @@ index 18976aa..d6e6bb7 100644
if ((ret = pgnutls_global_init()) != GNUTLS_E_SUCCESS)
{
@@ -1195,6 +1251,264 @@ static NTSTATUS key_symmetric_get_secret( struct key *key, UCHAR **secret, ULONG
@@ -1196,6 +1252,264 @@ static NTSTATUS key_symmetric_get_secret( struct key *key, UCHAR **secret, ULONG
return STATUS_SUCCESS;
}
@ -384,7 +384,7 @@ index 18976aa..d6e6bb7 100644
static NTSTATUS key_destroy( struct key *key )
{
if (key_is_symmetric(key))
@@ -1410,6 +1724,13 @@ static NTSTATUS key_symmetric_get_secret( struct key *key, UCHAR **secret, ULONG
@@ -1412,6 +1726,13 @@ static NTSTATUS key_symmetric_get_secret( struct key *key, UCHAR **secret, ULONG
return STATUS_NOT_IMPLEMENTED;
}
@ -398,7 +398,7 @@ index 18976aa..d6e6bb7 100644
static NTSTATUS key_destroy( struct key *key )
{
ERR( "support for keys not available at build time\n" );
@@ -1643,13 +1964,14 @@ NTSTATUS WINAPI BCryptVerifySignature( BCRYPT_KEY_HANDLE handle, void *padding,
@@ -1647,13 +1968,14 @@ NTSTATUS WINAPI BCryptVerifySignature( BCRYPT_KEY_HANDLE handle, void *padding,
{
struct key *key = handle;
@ -416,7 +416,7 @@ index 18976aa..d6e6bb7 100644
NTSTATUS WINAPI BCryptDestroyKey( BCRYPT_KEY_HANDLE handle )
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index fe57274..d42eb7c 100644
index c143ea7..f9587f8 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -1415,10 +1415,10 @@ static void test_ECDSA(void)

View File

@ -1,4 +1,4 @@
From 32fc25b7b03ff15fca7693aae94d206994fcf036 Mon Sep 17 00:00:00 2001
From d6296c86cc818de227689c44f3b6a01670115f2a 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,10 +10,10 @@ 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 d6e6bb7..52e1ae0 100644
index 17fb3fe..11f5fbb 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
@@ -72,6 +72,9 @@ static int (*pgnutls_pubkey_verify_hash2)(gnutls_pubkey_t key, gnutls_sign_algor
unsigned int flags, const gnutls_datum_t *hash,
const gnutls_datum_t *signature);
@ -23,7 +23,7 @@ index d6e6bb7..52e1ae0 100644
static void *libgnutls_handle;
#define MAKE_FUNCPTR(f) static typeof(f) * p##f
MAKE_FUNCPTR(gnutls_cipher_decrypt2);
@@ -121,6 +124,11 @@ static int compat_gnutls_pubkey_verify_hash2(gnutls_pubkey_t key, gnutls_sign_al
@@ -122,6 +125,11 @@ static int compat_gnutls_pubkey_verify_hash2(gnutls_pubkey_t key, gnutls_sign_al
return GNUTLS_E_UNKNOWN_CIPHER_TYPE;
}
@ -35,7 +35,7 @@ index d6e6bb7..52e1ae0 100644
static void gnutls_log( int level, const char *msg )
{
TRACE( "<%d> %s", level, msg );
@@ -181,6 +189,11 @@ static BOOL gnutls_initialize(void)
@@ -182,6 +190,11 @@ static BOOL gnutls_initialize(void)
WARN("gnutls_pubkey_verify_hash2 not found\n");
pgnutls_pubkey_verify_hash2 = compat_gnutls_pubkey_verify_hash2;
}
@ -47,7 +47,7 @@ index d6e6bb7..52e1ae0 100644
if ((ret = pgnutls_global_init()) != GNUTLS_E_SUCCESS)
{
@@ -272,6 +285,7 @@ enum alg_id
@@ -273,6 +286,7 @@ enum alg_id
ALG_ID_MD4,
ALG_ID_MD5,
ALG_ID_RNG,
@ -55,7 +55,7 @@ index d6e6bb7..52e1ae0 100644
ALG_ID_SHA1,
ALG_ID_SHA256,
ALG_ID_SHA384,
@@ -302,6 +316,7 @@ static const struct {
@@ -303,6 +317,7 @@ static const struct {
/* ALG_ID_MD4 */ { 270, 16, 512, BCRYPT_MD4_ALGORITHM, FALSE },
/* ALG_ID_MD5 */ { 274, 16, 512, BCRYPT_MD5_ALGORITHM, FALSE },
/* ALG_ID_RNG */ { 0, 0, 0, BCRYPT_RNG_ALGORITHM, FALSE },
@ -63,7 +63,7 @@ index d6e6bb7..52e1ae0 100644
/* ALG_ID_SHA1 */ { 278, 20, 512, BCRYPT_SHA1_ALGORITHM, FALSE },
/* ALG_ID_SHA256 */ { 286, 32, 512, BCRYPT_SHA256_ALGORITHM, FALSE },
/* ALG_ID_SHA384 */ { 382, 48, 1024, BCRYPT_SHA384_ALGORITHM, FALSE },
@@ -382,6 +397,7 @@ NTSTATUS WINAPI BCryptOpenAlgorithmProvider( BCRYPT_ALG_HANDLE *handle, LPCWSTR
@@ -383,6 +398,7 @@ NTSTATUS WINAPI BCryptOpenAlgorithmProvider( BCRYPT_ALG_HANDLE *handle, LPCWSTR
else if (!strcmpW( id, BCRYPT_MD4_ALGORITHM )) alg_id = ALG_ID_MD4;
else if (!strcmpW( id, BCRYPT_MD5_ALGORITHM )) alg_id = ALG_ID_MD5;
else if (!strcmpW( id, BCRYPT_RNG_ALGORITHM )) alg_id = ALG_ID_RNG;
@ -71,7 +71,7 @@ index d6e6bb7..52e1ae0 100644
else if (!strcmpW( id, BCRYPT_SHA1_ALGORITHM )) alg_id = ALG_ID_SHA1;
else if (!strcmpW( id, BCRYPT_SHA256_ALGORITHM )) alg_id = ALG_ID_SHA256;
else if (!strcmpW( id, BCRYPT_SHA384_ALGORITHM )) alg_id = ALG_ID_SHA384;
@@ -1021,6 +1037,7 @@ static NTSTATUS key_asymmetric_init( struct key *key, struct algorithm *alg, con
@@ -1022,6 +1038,7 @@ static NTSTATUS key_asymmetric_init( struct key *key, struct algorithm *alg, con
{
case ALG_ID_ECDSA_P256:
case ALG_ID_ECDSA_P384:
@ -79,7 +79,7 @@ index d6e6bb7..52e1ae0 100644
break;
default:
@@ -1397,6 +1414,34 @@ static NTSTATUS import_gnutls_pubkey_ecc( struct key *key, gnutls_pubkey_t *gnut
@@ -1398,6 +1415,34 @@ static NTSTATUS import_gnutls_pubkey_ecc( struct key *key, gnutls_pubkey_t *gnut
return STATUS_SUCCESS;
}
@ -114,7 +114,7 @@ index d6e6bb7..52e1ae0 100644
static NTSTATUS import_gnutls_pubkey( struct key *key, gnutls_pubkey_t *gnutls_key)
{
switch (key->alg_id)
@@ -1404,6 +1449,8 @@ static NTSTATUS import_gnutls_pubkey( struct key *key, gnutls_pubkey_t *gnutls_
@@ -1405,6 +1450,8 @@ static NTSTATUS import_gnutls_pubkey( struct key *key, gnutls_pubkey_t *gnutls_
case ALG_ID_ECDSA_P256:
case ALG_ID_ECDSA_P384:
return import_gnutls_pubkey_ecc( key, gnutls_key );
@ -123,7 +123,7 @@ index d6e6bb7..52e1ae0 100644
default:
FIXME("Algorithm %d not yet supported\n", key->alg_id);
@@ -1433,6 +1480,14 @@ static NTSTATUS prepare_gnutls_signature_ecc( struct key *key, UCHAR *signature,
@@ -1434,6 +1481,14 @@ static NTSTATUS prepare_gnutls_signature_ecc( struct key *key, UCHAR *signature,
return STATUS_SUCCESS;
}
@ -138,7 +138,7 @@ index d6e6bb7..52e1ae0 100644
static NTSTATUS prepare_gnutls_signature( struct key *key, UCHAR *signature, ULONG signature_len,
gnutls_datum_t *gnutls_signature )
{
@@ -1441,6 +1496,8 @@ static NTSTATUS prepare_gnutls_signature( struct key *key, UCHAR *signature, ULO
@@ -1442,6 +1497,8 @@ static NTSTATUS prepare_gnutls_signature( struct key *key, UCHAR *signature, ULO
case ALG_ID_ECDSA_P256:
case ALG_ID_ECDSA_P384:
return prepare_gnutls_signature_ecc( key, signature, signature_len, gnutls_signature );
@ -147,7 +147,7 @@ index d6e6bb7..52e1ae0 100644
default:
FIXME( "Algorithm %d not yet supported\n", key->alg_id );
@@ -1459,18 +1516,38 @@ static NTSTATUS key_asymmetric_verify( struct key *key, void *padding, UCHAR *ha
@@ -1460,18 +1517,38 @@ static NTSTATUS key_asymmetric_verify( struct key *key, void *padding, UCHAR *ha
NTSTATUS status;
int ret;
@ -195,7 +195,7 @@ index d6e6bb7..52e1ae0 100644
}
switch (key->alg_id)
@@ -1479,6 +1556,9 @@ static NTSTATUS key_asymmetric_verify( struct key *key, void *padding, UCHAR *ha
@@ -1480,6 +1557,9 @@ static NTSTATUS key_asymmetric_verify( struct key *key, void *padding, UCHAR *ha
case ALG_ID_ECDSA_P384:
pk_algo = GNUTLS_PK_ECC;
break;
@ -205,7 +205,7 @@ index d6e6bb7..52e1ae0 100644
default:
FIXME( "Algorithm %d not yet supported\n", key->alg_id );
@@ -1504,7 +1584,8 @@ static NTSTATUS key_asymmetric_verify( struct key *key, void *padding, UCHAR *ha
@@ -1505,7 +1585,8 @@ static NTSTATUS key_asymmetric_verify( struct key *key, void *padding, UCHAR *ha
gnutls_hash.size = hash_len;
ret = pgnutls_pubkey_verify_hash2( gnutls_key, sign_algo, 0, &gnutls_hash, &gnutls_signature );
@ -215,7 +215,7 @@ index d6e6bb7..52e1ae0 100644
pgnutls_pubkey_deinit( gnutls_key );
return (ret < 0) ? STATUS_INVALID_SIGNATURE : STATUS_SUCCESS;
}
@@ -1954,6 +2035,33 @@ NTSTATUS WINAPI BCryptImportKeyPair( BCRYPT_ALG_HANDLE algorithm, BCRYPT_KEY_HAN
@@ -1958,6 +2039,33 @@ NTSTATUS WINAPI BCryptImportKeyPair( BCRYPT_ALG_HANDLE algorithm, BCRYPT_KEY_HAN
*ret_key = key;
return STATUS_SUCCESS;
}

View File

@ -1,4 +1,4 @@
From c5480fb4f71d093e22c5ac9149a08879c66c14ee Mon Sep 17 00:00:00 2001
From 7b67f0c8ef5d80a930bc3a2826f2cd7551d625a4 Mon Sep 17 00:00:00 2001
From: Kimmo Myllyvirta <kimmo.myllyvirta@gmail.com>
Date: Tue, 10 Oct 2017 16:41:09 +0300
Subject: [PATCH] bcrypt/tests: Add simple test for RSA.
@ -12,7 +12,7 @@ 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 d42eb7c..0b27fce 100644
index f9587f8..e5bea89 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -1424,6 +1424,100 @@ static void test_ECDSA(void)

View File

@ -1,4 +1,4 @@
From cc01dabd2ec09d12972e7ce95a2894c39af4d8e9 Mon Sep 17 00:00:00 2001
From b76a055bfc3acdb49a9cc9601c9799169e45ddec Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 14 Oct 2017 22:44:13 +0200
Subject: [PATCH] bcrypt: Store full ECCKEY_BLOB struct in BCryptImportKeyPair.
@ -8,10 +8,10 @@ Subject: [PATCH] bcrypt: Store full ECCKEY_BLOB struct in BCryptImportKeyPair.
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 52e1ae0..a7f8fc4 100644
index 11f5fbb..203bd69 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -1379,6 +1379,7 @@ static void buffer_append_asn1_r_s( struct buffer *buffer, BYTE *r, DWORD r_len,
@@ -1380,6 +1380,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 52e1ae0..a7f8fc4 100644
gnutls_ecc_curve_t curve;
gnutls_datum_t x, y;
int ret;
@@ -1399,10 +1400,11 @@ static NTSTATUS import_gnutls_pubkey_ecc( struct key *key, gnutls_pubkey_t *gnut
@@ -1400,10 +1401,11 @@ static NTSTATUS import_gnutls_pubkey_ecc( struct key *key, gnutls_pubkey_t *gnut
return STATUS_INTERNAL_ERROR;
}
@ -35,7 +35,7 @@ index 52e1ae0..a7f8fc4 100644
if ((ret = pgnutls_pubkey_import_ecc_raw( *gnutls_key, curve, &x, &y )))
{
@@ -2026,7 +2028,7 @@ NTSTATUS WINAPI BCryptImportKeyPair( BCRYPT_ALG_HANDLE algorithm, BCRYPT_KEY_HAN
@@ -2030,7 +2032,7 @@ NTSTATUS WINAPI BCryptImportKeyPair( BCRYPT_ALG_HANDLE algorithm, BCRYPT_KEY_HAN
return STATUS_NO_MEMORY;
key->hdr.magic = MAGIC_KEY;

View File

@ -1,7 +1,7 @@
From 0fdcec4ed315b9633390d19258cff7bb209a5fb1 Mon Sep 17 00:00:00 2001
From 6dff4fbc02c7281a02c26d6ef46df3db9a65b20f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 22 Feb 2015 01:21:18 +0100
Subject: dxva2/tests: Add tests for dxva2 decoder.
Subject: [PATCH] dxva2/tests: Add tests for dxva2 decoder.
---
configure.ac | 1 +
@ -12,20 +12,20 @@ Subject: dxva2/tests: Add tests for dxva2 decoder.
create mode 100644 dlls/dxva2/tests/dxva2.c
diff --git a/configure.ac b/configure.ac
index faa7791ecb5..8dae7719327 100644
index a36ae73..9163f71 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3120,6 +3120,7 @@ WINE_CONFIG_DLL(dxgi,,[implib])
@@ -3209,6 +3209,7 @@ WINE_CONFIG_DLL(dxgi,,[implib])
WINE_CONFIG_TEST(dlls/dxgi/tests)
WINE_CONFIG_LIB(dxguid)
WINE_CONFIG_DLL(dxva2)
+WINE_CONFIG_TEST(dlls/dxva2/tests)
WINE_CONFIG_DLL(esent)
WINE_CONFIG_DLL(evr,,[clean])
WINE_CONFIG_DLL(evr)
WINE_CONFIG_TEST(dlls/evr/tests)
diff --git a/dlls/dxva2/tests/Makefile.in b/dlls/dxva2/tests/Makefile.in
new file mode 100644
index 00000000000..10d6af55667
index 0000000..10d6af5
--- /dev/null
+++ b/dlls/dxva2/tests/Makefile.in
@@ -0,0 +1,5 @@
@ -36,7 +36,7 @@ index 00000000000..10d6af55667
+ dxva2.c
diff --git a/dlls/dxva2/tests/dxva2.c b/dlls/dxva2/tests/dxva2.c
new file mode 100644
index 00000000000..dcbb990ee5c
index 0000000..dcbb990
--- /dev/null
+++ b/dlls/dxva2/tests/dxva2.c
@@ -0,0 +1,371 @@
@ -412,5 +412,5 @@ index 00000000000..dcbb990ee5c
+ test_decoder_service(window);
+}
--
2.14.1
1.9.1

View File

@ -1,7 +1,8 @@
From 1bef4fd44c776f823f87c1b1014d452888c1e8ea Mon Sep 17 00:00:00 2001
From 94dc68ec5e72106364d20829ab1ab11e98fa7320 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 22 Feb 2015 01:25:20 +0100
Subject: dxva2: Initial implementation of MPEG2 decoder using vaapi backend.
Subject: [PATCH] dxva2: Initial implementation of MPEG2 decoder using vaapi
backend.
---
configure.ac | 18 +-
@ -21,10 +22,10 @@ Subject: dxva2: Initial implementation of MPEG2 decoder using vaapi backend.
create mode 100644 dlls/dxva2/vaapi.c
diff --git a/configure.ac b/configure.ac
index 8dae7719327..9ab6cfafb1d 100644
index 9163f71..9d5929d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -103,6 +103,8 @@ AC_ARG_WITH(xxf86vm, AS_HELP_STRING([--without-xxf86vm],[do not use XFree vide
@@ -106,6 +106,8 @@ AC_ARG_WITH(xxf86vm, AS_HELP_STRING([--without-xxf86vm],[do not use XFree vide
[if test "x$withval" = "xno"; then ac_cv_header_X11_extensions_xf86vmode_h=no; ac_cv_header_X11_extensions_xf86vmproto_h=no; fi])
AC_ARG_WITH(zlib, AS_HELP_STRING([--without-zlib],[do not use Zlib (data compression)]),
[if test "x$withval" = "xno"; then ac_cv_header_zlib_h=no; fi])
@ -33,7 +34,7 @@ index 8dae7719327..9ab6cfafb1d 100644
AC_ARG_WITH(wine-tools,AS_HELP_STRING([--with-wine-tools=DIR],[use Wine tools from directory DIR]))
AC_ARG_WITH(wine64, AS_HELP_STRING([--with-wine64=DIR],[use the 64-bit Wine in DIR for a Wow64 build]))
@@ -1186,6 +1188,20 @@ This probably prevents linking to OpenGL. Try deleting the file and restarting c
@@ -1209,6 +1211,20 @@ This probably prevents linking to OpenGL. Try deleting the file and restarting c
WINE_WARNING_WITH(opengl,[test -n "$opengl_msg"],[$opengl_msg
OpenGL and Direct3D won't be supported.])
@ -54,7 +55,7 @@ index 8dae7719327..9ab6cfafb1d 100644
CPPFLAGS="$ac_save_CPPFLAGS"
else
X_CFLAGS=""
@@ -3119,7 +3135,7 @@ WINE_CONFIG_LIB(dxerr9)
@@ -3208,7 +3224,7 @@ WINE_CONFIG_LIB(dxerr9)
WINE_CONFIG_DLL(dxgi,,[implib])
WINE_CONFIG_TEST(dlls/dxgi/tests)
WINE_CONFIG_LIB(dxguid)
@ -62,9 +63,9 @@ index 8dae7719327..9ab6cfafb1d 100644
+WINE_CONFIG_DLL(dxva2,,[clean])
WINE_CONFIG_TEST(dlls/dxva2/tests)
WINE_CONFIG_DLL(esent)
WINE_CONFIG_DLL(evr,,[clean])
WINE_CONFIG_DLL(evr)
diff --git a/dlls/dxva2/Makefile.in b/dlls/dxva2/Makefile.in
index d484cb14bf2..68a7e3c8c0a 100644
index d484cb1..68a7e3c 100644
--- a/dlls/dxva2/Makefile.in
+++ b/dlls/dxva2/Makefile.in
@@ -1,8 +1,14 @@
@ -87,7 +88,7 @@ index d484cb14bf2..68a7e3c8c0a 100644
+ videoservices.c
diff --git a/dlls/dxva2/backend.idl b/dlls/dxva2/backend.idl
new file mode 100644
index 00000000000..8d488351ff2
index 0000000..8d48835
--- /dev/null
+++ b/dlls/dxva2/backend.idl
@@ -0,0 +1,96 @@
@ -188,7 +189,7 @@ index 00000000000..8d488351ff2
+ [out] IWineVideoDecoder **decoder);
+}
diff --git a/dlls/dxva2/dxva2_private.h b/dlls/dxva2/dxva2_private.h
index f0068b68891..f51863739b0 100644
index f0068b6..f518637 100644
--- a/dlls/dxva2/dxva2_private.h
+++ b/dlls/dxva2/dxva2_private.h
@@ -1,5 +1,5 @@
@ -323,7 +324,7 @@ index f0068b68891..f51863739b0 100644
+#endif /* HAVE_VAAPI */
diff --git a/dlls/dxva2/genericdecoder.c b/dlls/dxva2/genericdecoder.c
new file mode 100644
index 00000000000..3903d6b0b46
index 0000000..3903d6b
--- /dev/null
+++ b/dlls/dxva2/genericdecoder.c
@@ -0,0 +1,432 @@
@ -760,7 +761,7 @@ index 00000000000..3903d6b0b46
+ return S_OK;
+}
diff --git a/dlls/dxva2/main.c b/dlls/dxva2/main.c
index 0382b5fb00a..3006f175b7f 100644
index 0382b5f..3006f17 100644
--- a/dlls/dxva2/main.c
+++ b/dlls/dxva2/main.c
@@ -32,6 +32,8 @@
@ -854,7 +855,7 @@ index 0382b5fb00a..3006f175b7f 100644
return TRUE;
diff --git a/dlls/dxva2/tests/dxva2.c b/dlls/dxva2/tests/dxva2.c
index dcbb990ee5c..c28be4d8e3c 100644
index dcbb990..c28be4d 100644
--- a/dlls/dxva2/tests/dxva2.c
+++ b/dlls/dxva2/tests/dxva2.c
@@ -1,7 +1,7 @@
@ -935,7 +936,7 @@ index dcbb990ee5c..c28be4d8e3c 100644
IDirectXVideoDecoderService_Release(service);
diff --git a/dlls/dxva2/vaapi-mpeg2.c b/dlls/dxva2/vaapi-mpeg2.c
new file mode 100644
index 00000000000..7b7f61db755
index 0000000..7b7f61d
--- /dev/null
+++ b/dlls/dxva2/vaapi-mpeg2.c
@@ -0,0 +1,753 @@
@ -1694,7 +1695,7 @@ index 00000000000..7b7f61db755
+#endif /* HAVE_VAAPI */
diff --git a/dlls/dxva2/vaapi.c b/dlls/dxva2/vaapi.c
new file mode 100644
index 00000000000..80e63bf38d9
index 0000000..80e63bf
--- /dev/null
+++ b/dlls/dxva2/vaapi.c
@@ -0,0 +1,767 @@
@ -2466,7 +2467,7 @@ index 00000000000..80e63bf38d9
+
+#endif /* HAVE_VAAPI */
diff --git a/dlls/dxva2/videoservices.c b/dlls/dxva2/videoservices.c
index 46e431a7f29..84222dce558 100644
index 46e431a..84222dc 100644
--- a/dlls/dxva2/videoservices.c
+++ b/dlls/dxva2/videoservices.c
@@ -1,5 +1,5 @@
@ -2643,5 +2644,5 @@ index 46e431a7f29..84222dce558 100644
return E_NOINTERFACE;
}
--
2.14.1
1.9.1

View File

@ -1,7 +1,8 @@
From 413b8907e3c4747d83ccacf8657554552ff18620 Mon Sep 17 00:00:00 2001
From ee8847e54b1afeefbb21e3c1ce0e8c40cbf34cc0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 1 Apr 2016 01:29:51 +0200
Subject: fsutil: Add fsutil program with support for creating hard links.
Subject: [PATCH] fsutil: Add fsutil program with support for creating hard
links.
---
configure.ac | 2 +-
@ -14,17 +15,17 @@ Subject: fsutil: Add fsutil program with support for creating hard links.
create mode 100644 programs/fsutil/resources.h
diff --git a/configure.ac b/configure.ac
index 597b84e..1968321 100644
index 6baf58b..1b41c90 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3463,7 +3463,7 @@ WINE_CONFIG_PROGRAM(expand,,[install])
WINE_CONFIG_PROGRAM(explorer,,[clean,install])
@@ -3825,7 +3825,7 @@ WINE_CONFIG_PROGRAM(expand,,[install])
WINE_CONFIG_PROGRAM(explorer,,[install])
WINE_CONFIG_PROGRAM(extrac32,,[install])
WINE_CONFIG_PROGRAM(findstr,,[install])
-WINE_CONFIG_PROGRAM(fsutil,,[install])
+WINE_CONFIG_PROGRAM(fsutil,,[clean,install])
WINE_CONFIG_PROGRAM(hh,,[install])
WINE_CONFIG_PROGRAM(hostname,,[clean,install])
WINE_CONFIG_PROGRAM(hostname,,[install])
WINE_CONFIG_PROGRAM(icacls,,[install])
diff --git a/programs/fsutil/Makefile.in b/programs/fsutil/Makefile.in
index f339c4c..7433695 100644
@ -265,5 +266,5 @@ index 0000000..b85826a
+#define STRING_HARDLINK_USAGE 104
+#define STRING_HARDLINK_CREATE_USAGE 105
--
2.8.0
1.9.1

View File

@ -1,4 +1,4 @@
From b8ccfc99a86a2431888e02019fbc42ebaa2f65c2 Mon Sep 17 00:00:00 2001
From 33fb892671a02207304145a987bb02885fb6b6b2 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: [PATCH] kernelbase: Add semi-stub for PathCchCombineEx.
@ -19,12 +19,12 @@ Subject: [PATCH] kernelbase: Add semi-stub for PathCchCombineEx.
create mode 100644 include/pathcch.h
diff --git a/configure.ac b/configure.ac
index d06476e..a12e04d 100644
index 1b41c90..6621815 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3297,7 +3297,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_DLL(kernel32,,[implib])
WINE_CONFIG_TEST(dlls/kernel32/tests)
-WINE_CONFIG_DLL(kernelbase)
+WINE_CONFIG_DLL(kernelbase,,[implib])
@ -58,7 +58,7 @@ index 74df98c..247c6bf 100644
C_SRCS = \
main.c
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
index eb6edbe..065af41 100644
index 6c61c51..55737f9 100644
--- a/dlls/kernelbase/kernelbase.spec
+++ b/dlls/kernelbase/kernelbase.spec
@@ -1037,7 +1037,7 @@
@ -71,10 +71,10 @@ index eb6edbe..065af41 100644
# @ stub PathCchIsRoot
# @ stub PathCchRemoveBackslash
diff --git a/dlls/kernelbase/main.c b/dlls/kernelbase/main.c
index 9c89ff4..7e5ffde 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,7 +86,7 @@ index 9c89ff4..7e5ffde 100644
WINE_DEFAULT_DEBUG_CHANNEL(kernelbase);
@@ -87,3 +91,28 @@ BOOL WINAPI QuirkIsEnabled3(void *unk1, void *unk2)
@@ -97,3 +101,28 @@ BOOL WINAPI QuirkIsEnabled3(void *unk1, void *unk2)
return FALSE;
}
@ -246,10 +246,10 @@ index 0000000..c848640
+ test_PathCchCombineEx();
+}
diff --git a/include/Makefile.in b/include/Makefile.in
index f1bcba3..72304d6 100644
index 563d10c..ac0ff21 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -494,6 +494,7 @@ SOURCES = \
@@ -495,6 +495,7 @@ SOURCES = \
opnrst.idl \
optary.idl \
patchapi.h \

View File

@ -1,7 +1,7 @@
From 8570cb45ae2a6e39df2fe1d9642fb4d987d6b2e0 Mon Sep 17 00:00:00 2001
From 19fd6f33b8e55707072feb5d08d0f62028265951 Mon Sep 17 00:00:00 2001
From: Mark Jansen <learn0more+wine@gmail.com>
Date: Fri, 13 Jan 2017 23:20:52 +0100
Subject: msi: Do not sign extend after multiplying.
Subject: [PATCH] msi: Do not sign extend after multiplying.
Signed-off-by: Mark Jansen <learn0more+wine@gmail.com>
---
@ -9,10 +9,10 @@ Signed-off-by: Mark Jansen <learn0more+wine@gmail.com>
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c
index fc9c24c90a3..d9a2ab7a614 100644
index 8825c28..97fc89c 100644
--- a/dlls/msi/dialog.c
+++ b/dlls/msi/dialog.c
@@ -3184,13 +3184,13 @@ static LONGLONG msi_vcl_get_cost( msi_dialog *dialog )
@@ -3200,13 +3200,13 @@ static LONGLONG msi_vcl_get_cost( msi_dialog *dialog )
MSICOSTTREE_SELFONLY, INSTALLSTATE_LOCAL, &each_cost)))
{
/* each_cost is in 512-byte units */
@ -29,5 +29,5 @@ index fc9c24c90a3..d9a2ab7a614 100644
}
return total_cost;
--
2.11.0
1.9.1

View File

@ -1,7 +1,7 @@
From 608383e76cb10d836433a2a7355a1e8e790a63e1 Mon Sep 17 00:00:00 2001
From b252ccdcbb84f5aef2d83b1324598b93b6ac2bba Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
Date: Tue, 15 Sep 2015 17:44:33 -0600
Subject: msidb: Add stub tool for manipulating MSI databases.
Subject: [PATCH] msidb: Add stub tool for manipulating MSI databases.
Signed-off-by: Erich E. Hoover <erich.e.hoover@wine-staging.com>
---
@ -13,17 +13,17 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@wine-staging.com>
create mode 100644 programs/msidb/main.c
diff --git a/configure.ac b/configure.ac
index c624c9e..1bb859e 100644
index e1a20cc..6f61b42 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3552,6 +3552,7 @@ WINE_CONFIG_PROGRAM(ipconfig,,[clean,install])
@@ -3855,6 +3855,7 @@ WINE_CONFIG_PROGRAM(ipconfig,,[install])
WINE_CONFIG_PROGRAM(lodctr,,[install])
WINE_CONFIG_PROGRAM(mofcomp,,[install])
WINE_CONFIG_PROGRAM(mshta,,[install])
+WINE_CONFIG_PROGRAM(msidb,,[install,installbin])
WINE_CONFIG_PROGRAM(msiexec,,[install,installbin,manpage])
WINE_CONFIG_PROGRAM(msinfo32,,[clean,install])
WINE_CONFIG_PROGRAM(net,,[clean,install])
WINE_CONFIG_PROGRAM(msinfo32,,[install])
WINE_CONFIG_PROGRAM(net,,[install])
diff --git a/programs/msidb/Makefile.in b/programs/msidb/Makefile.in
new file mode 100644
index 0000000..dae699c
@ -198,5 +198,5 @@ index 0000000..43cc519
+ return 0;
+}
--
2.9.0
1.9.1

View File

@ -1,7 +1,7 @@
From f5711f1aa3676f55e7defb3996163e3fb327fc1f Mon Sep 17 00:00:00 2001
From 79d723df10d8acf6e284fea53008e3543e9115f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 17 Jan 2016 00:50:50 +0100
Subject: [PATCH 3/3] ntdll/tests: Add basic tests for RtlQueryPackageIdentity.
Subject: [PATCH] ntdll/tests: Add basic tests for RtlQueryPackageIdentity.
---
dlls/ntdll/tests/Makefile.in | 2 +-
@ -9,12 +9,12 @@ Subject: [PATCH 3/3] ntdll/tests: Add basic tests for RtlQueryPackageIdentity.
2 files changed, 77 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/tests/Makefile.in b/dlls/ntdll/tests/Makefile.in
index fc352dd..0de4fe8 100644
index 5c70f3f..0de4fe8 100644
--- a/dlls/ntdll/tests/Makefile.in
+++ b/dlls/ntdll/tests/Makefile.in
@@ -1,5 +1,5 @@
TESTDLL = ntdll.dll
-IMPORTS = user32
-IMPORTS = user32 advapi32
+IMPORTS = user32 ole32 advapi32
C_SRCS = \
@ -134,5 +134,5 @@ index 2e3a7de..02ae1c1 100644
test_RtlMakeSelfRelativeSD();
}
--
2.7.4
1.9.1

View File

@ -1,30 +1,34 @@
From 4ff8f6fbd144d0db7aa03da44f1d3079b09a4f5a Mon Sep 17 00:00:00 2001
From d08b2a4d6860db1cf9a7b3e5b7e2b7b1615783c3 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 3 Jan 2015 03:32:12 +0100
Subject: nvcuda: Add stub dll.
Subject: [PATCH] nvcuda: Add stub dll.
---
configure.ac | 1 +
configure.ac | 3 +-
dlls/nvcuda/Makefile.in | 6 +
dlls/nvcuda/nvcuda.c | 37 ++++++
dlls/nvcuda/nvcuda.rc | 33 ++++++
dlls/nvcuda/nvcuda.spec | 308 ++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 385 insertions(+)
5 files changed, 386 insertions(+), 1 deletion(-)
create mode 100644 dlls/nvcuda/Makefile.in
create mode 100644 dlls/nvcuda/nvcuda.c
create mode 100644 dlls/nvcuda/nvcuda.rc
create mode 100644 dlls/nvcuda/nvcuda.spec
diff --git a/configure.ac b/configure.ac
index 32b2e16..1e38434 100644
index 197d1e6..a49c31a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3159,4 +3159,5 @@ WINE_CONFIG_DLL(ntoskrnl.exe,,[implib])
@@ -3534,7 +3534,8 @@ WINE_CONFIG_TEST(dlls/ntdsapi/tests)
WINE_CONFIG_DLL(ntoskrnl.exe,,[implib],[ntoskrnl])
WINE_CONFIG_DLL(ntprint)
WINE_CONFIG_TEST(dlls/ntprint/tests)
-WINE_CONFIG_DLL(objsel)
+WINE_CONFIG_DLL(nvcuda)
WINE_CONFIG_DLL(objsel,,[clean])
+WINE_CONFIG_DLL(objsel,,[clean])
WINE_CONFIG_DLL(odbc32,,[implib])
WINE_CONFIG_DLL(odbccp32,,[implib])
WINE_CONFIG_TEST(dlls/odbccp32/tests)
diff --git a/dlls/nvcuda/Makefile.in b/dlls/nvcuda/Makefile.in
new file mode 100644
index 0000000..4b33278
@ -434,5 +438,5 @@ index 0000000..279f7ab
+@ stub cuTexRefSetMipmappedArray
+@ stub cuWGLGetDevice
--
2.4.0
1.9.1

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "538263d0efe725124df88ce1cce124bc3ad7e2af"
echo "c3beca6c8fc8c07ecd992e64f8f8d0dda3a10ac8"
}
# Show version information

View File

@ -1,4 +1,4 @@
From 95eab098efeadb0332b80e070c118bfd92464de6 Mon Sep 17 00:00:00 2001
From e89528274c3aabc85a1e48bbcfe4cb7ff35bad8d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 9 Aug 2015 02:38:18 +0200
Subject: [PATCH] uxthemegtk: Add configure check and stub dll.
@ -20,7 +20,7 @@ List of functions updated by Ivan Akulinchev <ivan.akulinchev@gmail.com>.
create mode 100644 dlls/uxtheme-gtk/version.rc
diff --git a/aclocal.m4 b/aclocal.m4
index 633f080f4a..ab81abd807 100644
index 334d7a8..b76f58c 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -125,6 +125,26 @@ test -z "$ac_libs" || ac_libs=`echo " $ac_libs" | sed 's/ -L\([[^/]]\)/ -L\$(top
@ -51,7 +51,7 @@ index 633f080f4a..ab81abd807 100644
dnl
dnl Usage: WINE_TRY_ASM_LINK(asm-code,includes,function,[action-if-found,[action-if-not-found]])
diff --git a/configure.ac b/configure.ac
index cb9d4b2b9c..086cc8880c 100644
index 16db21f..84e8dd1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,6 +56,7 @@ AC_ARG_WITH(gsm, AS_HELP_STRING([--without-gsm],[do not use libgsm (GSM 06
@ -89,17 +89,17 @@ index cb9d4b2b9c..086cc8880c 100644
dnl **** Check for FreeType 2 ****
if test "x$with_freetype" != "xno"
then
@@ -3713,6 +3734,7 @@ WINE_CONFIG_TEST(dlls/userenv/tests)
@@ -3709,6 +3730,7 @@ WINE_CONFIG_TEST(dlls/userenv/tests)
WINE_CONFIG_DLL(usp10,,[implib])
WINE_CONFIG_TEST(dlls/usp10/tests)
WINE_CONFIG_LIB(uuid)
+WINE_CONFIG_DLL(uxtheme-gtk)
WINE_CONFIG_DLL(uxtheme,,[implib])
WINE_CONFIG_TEST(dlls/uxtheme/tests)
WINE_CONFIG_DLL(vbscript,,[clean])
WINE_CONFIG_DLL(vbscript)
diff --git a/dlls/uxtheme-gtk/Makefile.in b/dlls/uxtheme-gtk/Makefile.in
new file mode 100644
index 0000000000..07cf3a0fb5
index 0000000..07cf3a0f
--- /dev/null
+++ b/dlls/uxtheme-gtk/Makefile.in
@@ -0,0 +1,7 @@
@ -112,14 +112,14 @@ index 0000000000..07cf3a0fb5
+RC_SRCS = version.rc
diff --git a/dlls/uxtheme-gtk/uxtheme-gtk.spec b/dlls/uxtheme-gtk/uxtheme-gtk.spec
new file mode 100644
index 0000000000..b7db25411d
index 0000000..b7db254
--- /dev/null
+++ b/dlls/uxtheme-gtk/uxtheme-gtk.spec
@@ -0,0 +1 @@
+# Empty
diff --git a/dlls/uxtheme-gtk/uxtheme.c b/dlls/uxtheme-gtk/uxtheme.c
new file mode 100644
index 0000000000..cd5e3c04cf
index 0000000..cd5e3c0
--- /dev/null
+++ b/dlls/uxtheme-gtk/uxtheme.c
@@ -0,0 +1,218 @@
@ -343,7 +343,7 @@ index 0000000000..cd5e3c04cf
+}
diff --git a/dlls/uxtheme-gtk/uxthemegtk.h b/dlls/uxtheme-gtk/uxthemegtk.h
new file mode 100644
index 0000000000..42e4784087
index 0000000..42e4784
--- /dev/null
+++ b/dlls/uxtheme-gtk/uxthemegtk.h
@@ -0,0 +1,88 @@
@ -437,7 +437,7 @@ index 0000000000..42e4784087
+#endif /* UXTHEMEGTK_H */
diff --git a/dlls/uxtheme-gtk/version.rc b/dlls/uxtheme-gtk/version.rc
new file mode 100644
index 0000000000..38db52103b
index 0000000..38db521
--- /dev/null
+++ b/dlls/uxtheme-gtk/version.rc
@@ -0,0 +1,21 @@
@ -463,5 +463,5 @@ index 0000000000..38db52103b
+
+#include <wine/wine_common_ver.rc>
--
2.16.1
1.9.1

View File

@ -1,7 +1,7 @@
From 8d954ec809284c36ac4d8ea4f16b42cb9920b896 Mon Sep 17 00:00:00 2001
From f47c0b273cc8d9765ddde4c9fa2698c58ae1db0c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 11 Mar 2016 21:44:53 +0100
Subject: wuauserv: Add dummy service.
Subject: [PATCH] wuauserv: Add dummy service.
---
configure.ac | 1 +
@ -13,22 +13,22 @@ Subject: wuauserv: Add dummy service.
create mode 100644 programs/wuauserv/main.c
diff --git a/configure.ac b/configure.ac
index ba8fd0f..f6ffe87 100644
index bfca87c..ce1f326 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3616,6 +3616,7 @@ WINE_CONFIG_PROGRAM(wordpad,,[clean,install])
WINE_CONFIG_PROGRAM(write,,[clean,install])
WINE_CONFIG_PROGRAM(wscript,,[clean,install])
@@ -4004,6 +4004,7 @@ WINE_CONFIG_PROGRAM(wordpad,,[install])
WINE_CONFIG_PROGRAM(write,,[install])
WINE_CONFIG_PROGRAM(wscript,,[install])
WINE_CONFIG_TEST(programs/wscript/tests)
+WINE_CONFIG_PROGRAM(wuauserv,,[install])
WINE_CONFIG_PROGRAM(wusa,,[install])
WINE_CONFIG_PROGRAM(xcopy,,[clean,install])
WINE_CONFIG_PROGRAM(xcopy,,[install])
WINE_CONFIG_TEST(programs/xcopy/tests)
diff --git a/loader/wine.inf.in b/loader/wine.inf.in
index fcf9c4a..5ca83a1 100644
index 90acd58..638be4f 100644
--- a/loader/wine.inf.in
+++ b/loader/wine.inf.in
@@ -132,6 +132,7 @@ AddService=FontCache,0,FontCacheService
@@ -135,6 +135,7 @@ AddService=FontCache,0,FontCacheService
AddService=Schedule,0,TaskSchedulerService
AddService=WineBus,0,WineBusService
AddService=WineHID,0,WineHIDService
@ -36,7 +36,7 @@ index fcf9c4a..5ca83a1 100644
[DefaultInstall.NT.Services]
AddService=BITS,0,BITSService
@@ -148,6 +149,7 @@ AddService=FontCache,0,FontCacheService
@@ -151,6 +152,7 @@ AddService=FontCache,0,FontCacheService
AddService=Schedule,0,TaskSchedulerService
AddService=WineBus,0,WineBusService
AddService=WineHID,0,WineHIDService
@ -44,7 +44,7 @@ index fcf9c4a..5ca83a1 100644
[DefaultInstall.ntamd64.Services]
AddService=BITS,0,BITSService
@@ -164,6 +166,7 @@ AddService=FontCache,0,FontCacheService
@@ -167,6 +169,7 @@ AddService=FontCache,0,FontCacheService
AddService=Schedule,0,TaskSchedulerService
AddService=WineBus,0,WineBusService
AddService=WineHID,0,WineHIDService
@ -52,7 +52,7 @@ index fcf9c4a..5ca83a1 100644
[Strings]
MciExtStr="Software\Microsoft\Windows NT\CurrentVersion\MCI Extensions"
@@ -3301,6 +3304,14 @@ ErrorControl=1
@@ -3457,6 +3460,14 @@ ErrorControl=1
HKR,Parameters,"ServiceDll",,"%11%\schedsvc.dll"
HKLM,%CurrentVersionNT%\SvcHost,"netsvcs",0x00010008,"Schedule"
@ -190,5 +190,5 @@ index 0000000..31df299
+ return 0;
+}
--
2.9.0
1.9.1