You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Compare commits
108 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
923434cd32 | ||
|
f419a53698 | ||
|
5e8beb5ff2 | ||
|
37de066533 | ||
|
e108b600b5 | ||
|
06ad40cfd0 | ||
|
bd8f790f9b | ||
|
4a23a62b5d | ||
|
e6cfe1ccd8 | ||
|
b50c875c39 | ||
|
b02bd9c446 | ||
|
7c1618b197 | ||
|
733fa5c485 | ||
|
b74293fbfe | ||
|
38aa047cad | ||
|
778998c66e | ||
|
d12fcebb0e | ||
|
7937739028 | ||
|
13b580a0c8 | ||
|
b3c99ebf4b | ||
|
87578b4c82 | ||
|
be81b6245c | ||
|
b1b1abafe7 | ||
|
0b57832a15 | ||
|
b080509a3b | ||
|
4d363d04f9 | ||
|
7cbbfd0a9e | ||
|
27ff0169ed | ||
|
32bac8b64c | ||
|
b8de62375f | ||
|
697fe8b5da | ||
|
c6aeba1397 | ||
|
3d74da6622 | ||
|
ecc4fe6d6a | ||
|
35f9449641 | ||
|
f605d79997 | ||
|
ab89820aa5 | ||
|
f85accadd5 | ||
|
533cbe994f | ||
|
9f5a34bcb8 | ||
|
ca3bfa28f9 | ||
|
3dab9e5e6b | ||
|
1edb7d5bc5 | ||
|
0f48c0caac | ||
|
785d3c2244 | ||
|
fd3b0a7361 | ||
|
d25f4cf2e2 | ||
|
7a2d7b751d | ||
|
4f5ec5595c | ||
|
75e683d877 | ||
|
4839b31cec | ||
|
46fc7a5a0d | ||
|
6df93d0242 | ||
|
fc1eb83a27 | ||
|
53de6620d0 | ||
|
d2a48f1ad3 | ||
|
1c5f409745 | ||
|
60f0f50382 | ||
|
ceb31ed876 | ||
|
3b56f9ccef | ||
|
8a60fbdd19 | ||
|
6fbde84214 | ||
|
3a0fddb73c | ||
|
5e5c754a8b | ||
|
04c8f24337 | ||
|
b39ac4692c | ||
|
6cfd7b70ba | ||
|
8de9c65504 | ||
|
f04ae5b1da | ||
|
0501c71fce | ||
|
690a18a601 | ||
|
eb09d462e2 | ||
|
3161e5be34 | ||
|
17083b95bb | ||
|
50f0724f43 | ||
|
54f9a82de8 | ||
|
fe96596a19 | ||
|
929bc28ac8 | ||
|
a7ad40c135 | ||
|
4d4e02e26b | ||
|
40821d91e2 | ||
|
9256515a12 | ||
|
ae1f954ed1 | ||
|
ccad76f64a | ||
|
b1066c7064 | ||
|
b636153ec4 | ||
|
f8064b4dbe | ||
|
b7a4aade29 | ||
|
9e8d000f35 | ||
|
42b756066b | ||
|
ee381d1ad0 | ||
|
9a858d4f4c | ||
|
3878c8eb1b | ||
|
5020088406 | ||
|
c119ae9eeb | ||
|
476caa4a5f | ||
|
9982d2e0ee | ||
|
2b2bf8ac06 | ||
|
088524a29e | ||
|
31d525e567 | ||
|
7d26828643 | ||
|
3dc3c4e0e2 | ||
|
154875b4e9 | ||
|
66148cb9b2 | ||
|
cfbf5f7b86 | ||
|
6f1b2ab35a | ||
|
550e67b8a2 | ||
|
e45211698d |
@@ -1,7 +1,7 @@
|
||||
From 744549e1ecc76c3764079d337c09445d01a3527e Mon Sep 17 00:00:00 2001
|
||||
From 5e4c31d0796f2e559889d4f84cdb571130217e7d Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 22 Mar 2016 21:58:40 +0100
|
||||
Subject: dwrite: Avoid implicit cast of interface pointer.
|
||||
Subject: [PATCH] dwrite: Avoid implicit cast of interface pointer.
|
||||
|
||||
---
|
||||
dlls/dwrite/font.c | 4 ++--
|
||||
@@ -9,10 +9,10 @@ Subject: dwrite: Avoid implicit cast of interface pointer.
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c
|
||||
index d9ddce0..0a90c20 100644
|
||||
index f50133d..1bc7b59 100644
|
||||
--- a/dlls/dwrite/font.c
|
||||
+++ b/dlls/dwrite/font.c
|
||||
@@ -1684,7 +1684,7 @@ static struct dwrite_font *unsafe_impl_from_IDWriteFont(IDWriteFont *iface)
|
||||
@@ -1815,7 +1815,7 @@ static struct dwrite_font *unsafe_impl_from_IDWriteFont(IDWriteFont *iface)
|
||||
if (!iface)
|
||||
return NULL;
|
||||
assert(iface->lpVtbl == (IDWriteFontVtbl*)&dwritefontvtbl);
|
||||
@@ -20,8 +20,8 @@ index d9ddce0..0a90c20 100644
|
||||
+ return CONTAINING_RECORD((IDWriteFont3 *)iface, struct dwrite_font, IDWriteFont3_iface);
|
||||
}
|
||||
|
||||
static struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface)
|
||||
@@ -1692,7 +1692,7 @@ static struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace
|
||||
struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface)
|
||||
@@ -1823,7 +1823,7 @@ struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface)
|
||||
if (!iface)
|
||||
return NULL;
|
||||
assert(iface->lpVtbl == (IDWriteFontFaceVtbl*)&dwritefontfacevtbl);
|
||||
@@ -31,10 +31,10 @@ index d9ddce0..0a90c20 100644
|
||||
|
||||
void get_logfont_from_font(IDWriteFont *iface, LOGFONTW *lf)
|
||||
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
|
||||
index 706ed4e..c76a909 100644
|
||||
index f27fe9f..ee1eb5a 100644
|
||||
--- a/dlls/dwrite/layout.c
|
||||
+++ b/dlls/dwrite/layout.c
|
||||
@@ -5196,7 +5196,7 @@ static const IDWriteTextFormat2Vtbl dwritetextformatvtbl = {
|
||||
@@ -5622,7 +5622,7 @@ static const IDWriteTextFormat2Vtbl dwritetextformatvtbl = {
|
||||
static struct dwrite_textformat *unsafe_impl_from_IDWriteTextFormat(IDWriteTextFormat *iface)
|
||||
{
|
||||
return (iface->lpVtbl == (IDWriteTextFormatVtbl*)&dwritetextformatvtbl) ?
|
||||
@@ -44,5 +44,5 @@ index 706ed4e..c76a909 100644
|
||||
|
||||
HRESULT create_textformat(const WCHAR *family_name, IDWriteFontCollection *collection, DWRITE_FONT_WEIGHT weight, DWRITE_FONT_STYLE style,
|
||||
--
|
||||
2.9.0
|
||||
1.9.1
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
From 42dbdf9479e2e09734fa183b854d5ddfe987f203 Mon Sep 17 00:00:00 2001
|
||||
From 494fc3abe1eddabcf7cede677ee907284e89eea8 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 22 Mar 2016 23:08:30 +0100
|
||||
Subject: [PATCH] include: Check element type in CONTAINING_RECORD and
|
||||
similar macros.
|
||||
Subject: [PATCH] include: Check element type in CONTAINING_RECORD and similar
|
||||
macros.
|
||||
|
||||
---
|
||||
include/wine/list.h | 10 ++++++++--
|
||||
@@ -11,7 +11,7 @@ Subject: [PATCH] include: Check element type in CONTAINING_RECORD and
|
||||
3 files changed, 24 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/include/wine/list.h b/include/wine/list.h
|
||||
index b4d681f..287ad39 100644
|
||||
index b4d681fe..287ad394 100644
|
||||
--- a/include/wine/list.h
|
||||
+++ b/include/wine/list.h
|
||||
@@ -228,7 +228,13 @@ static inline void list_move_head( struct list *dst, struct list *src )
|
||||
@@ -31,7 +31,7 @@ index b4d681f..287ad39 100644
|
||||
|
||||
#endif /* __WINE_SERVER_LIST_H */
|
||||
diff --git a/include/wine/rbtree.h b/include/wine/rbtree.h
|
||||
index dc50b5e..8130deb 100644
|
||||
index dc50b5e7..8130deb5 100644
|
||||
--- a/include/wine/rbtree.h
|
||||
+++ b/include/wine/rbtree.h
|
||||
@@ -23,8 +23,14 @@
|
||||
@@ -52,12 +52,12 @@ index dc50b5e..8130deb 100644
|
||||
struct wine_rb_entry
|
||||
{
|
||||
diff --git a/include/winnt.h b/include/winnt.h
|
||||
index 7f822c4..ccfe73b 100644
|
||||
index 2b489382..a156efc4 100644
|
||||
--- a/include/winnt.h
|
||||
+++ b/include/winnt.h
|
||||
@@ -756,8 +756,14 @@ typedef struct _MEMORY_BASIC_INFORMATION
|
||||
|
||||
#define FIELD_OFFSET(type, field) ((LONG)offsetof(type, field))
|
||||
@@ -760,8 +760,14 @@ typedef struct _MEMORY_BASIC_INFORMATION
|
||||
#define RTL_FIELD_SIZE(type, field) (sizeof(((type *)0)->field))
|
||||
#define RTL_SIZEOF_THROUGH_FIELD(type, field) (FIELD_OFFSET(type, field) + RTL_FIELD_SIZE(type, field))
|
||||
|
||||
-#define CONTAINING_RECORD(address, type, field) \
|
||||
- ((type *)((PCHAR)(address) - offsetof(type, field)))
|
||||
@@ -73,5 +73,5 @@ index 7f822c4..ccfe73b 100644
|
||||
#ifdef __WINESRC__
|
||||
# define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
|
||||
--
|
||||
1.9.1
|
||||
2.20.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From d67d7293a17592b580d284fa68881a613e61f591 Mon Sep 17 00:00:00 2001
|
||||
From f94296129eb249a04ccb012a10f50b79fb0a631a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 5 Aug 2017 01:45:29 +0200
|
||||
Subject: [PATCH] ntdll: Add function to create new tokens for elevation
|
||||
@@ -14,10 +14,10 @@ Subject: [PATCH] ntdll: Add function to create new tokens for elevation
|
||||
6 files changed, 117 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
|
||||
index dbead5e..586b504 100644
|
||||
index 969cee7..008abb7 100644
|
||||
--- a/dlls/ntdll/ntdll.spec
|
||||
+++ b/dlls/ntdll/ntdll.spec
|
||||
@@ -1482,6 +1482,9 @@
|
||||
@@ -1508,6 +1508,9 @@
|
||||
# Virtual memory
|
||||
@ cdecl __wine_locked_recvmsg(long ptr long)
|
||||
|
||||
@@ -28,12 +28,12 @@ index dbead5e..586b504 100644
|
||||
@ cdecl wine_get_version() NTDLL_wine_get_version
|
||||
@ cdecl wine_get_patches() NTDLL_wine_get_patches
|
||||
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
|
||||
index 8a64338..137a22d 100644
|
||||
index 5a93ede..cb02bd1 100644
|
||||
--- a/dlls/ntdll/ntdll_misc.h
|
||||
+++ b/dlls/ntdll/ntdll_misc.h
|
||||
@@ -80,6 +80,9 @@ extern void virtual_init_threading(void) DECLSPEC_HIDDEN;
|
||||
extern void fill_cpu_info(void) DECLSPEC_HIDDEN;
|
||||
extern void heap_set_debug_flags( HANDLE handle ) DECLSPEC_HIDDEN;
|
||||
@@ -83,6 +83,9 @@ extern void heap_set_debug_flags( HANDLE handle ) DECLSPEC_HIDDEN;
|
||||
extern void init_user_process_params( SIZE_T data_size ) DECLSPEC_HIDDEN;
|
||||
extern void update_user_process_params( const UNICODE_STRING *image ) DECLSPEC_HIDDEN;
|
||||
|
||||
+/* token */
|
||||
+extern HANDLE CDECL __wine_create_default_token(BOOL admin);
|
||||
@@ -42,10 +42,10 @@ index 8a64338..137a22d 100644
|
||||
extern timeout_t server_start_time DECLSPEC_HIDDEN;
|
||||
extern unsigned int server_cpus DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
|
||||
index 40034b4..1ebbb79 100644
|
||||
index 2ff8610..bb4a171 100644
|
||||
--- a/dlls/ntdll/process.c
|
||||
+++ b/dlls/ntdll/process.c
|
||||
@@ -99,6 +99,24 @@ HANDLE CDECL __wine_make_process_system(void)
|
||||
@@ -118,6 +118,24 @@ HANDLE CDECL __wine_make_process_system(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -71,10 +71,10 @@ index 40034b4..1ebbb79 100644
|
||||
|
||||
#define UNIMPLEMENTED_INFO_CLASS(c) \
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 0bb04cd..f2deca6 100644
|
||||
index 493100b..071f740 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3641,6 +3641,14 @@ struct handle_info
|
||||
@@ -3666,6 +3666,14 @@ struct handle_info
|
||||
@END
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ index 6c33714..21e90cc 100644
|
||||
|
||||
/* token functions */
|
||||
diff --git a/server/token.c b/server/token.c
|
||||
index 7776cbe..64ab565 100644
|
||||
index 4c37c67..e449e61 100644
|
||||
--- a/server/token.c
|
||||
+++ b/server/token.c
|
||||
@@ -79,6 +79,7 @@ static const SID anonymous_logon_sid = { SID_REVISION, 1, { SECURITY_NT_AUTHORIT
|
||||
@@ -121,7 +121,7 @@ index 7776cbe..64ab565 100644
|
||||
|
||||
static luid_t prev_luid_value = { 1000, 0 };
|
||||
|
||||
@@ -901,6 +903,64 @@ struct token *token_create_admin( void )
|
||||
@@ -908,6 +910,64 @@ struct token *token_create_admin( void )
|
||||
return token;
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ index 7776cbe..64ab565 100644
|
||||
static struct privilege *token_find_privilege( struct token *token, const LUID *luid, int enabled_only )
|
||||
{
|
||||
struct privilege *privilege;
|
||||
@@ -1718,3 +1778,27 @@ DECL_HANDLER(set_token_default_dacl)
|
||||
@@ -1713,3 +1773,27 @@ DECL_HANDLER(set_token_default_dacl)
|
||||
release_object( token );
|
||||
}
|
||||
}
|
||||
|
@@ -1,25 +1,24 @@
|
||||
From 3ff546b9cbde1d0f5ea43c5cbb92ac8dc2028676 Mon Sep 17 00:00:00 2001
|
||||
From dd6544561d6432555f14a9004e107e6b87564949 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 5 Aug 2017 03:39:55 +0200
|
||||
Subject: [PATCH] ntdll: Implement process token elevation through manifests.
|
||||
|
||||
---
|
||||
dlls/ntdll/loader.c | 37 +++++++++++++++++++++++++++++++++++++
|
||||
dlls/ntdll/loader.c | 40 ++++++++++++++++++++++++++++++++++++++--
|
||||
server/process.c | 8 ++++++++
|
||||
server/process.h | 1 +
|
||||
server/protocol.def | 7 +++++++
|
||||
server/token.c | 14 ++++++++++++++
|
||||
5 files changed, 67 insertions(+)
|
||||
5 files changed, 68 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index 3fcbbf77a5..2399f1246e 100644
|
||||
index d7dbe57..7588d5a 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -3054,6 +3054,32 @@ NTSTATUS attach_dlls( CONTEXT *context )
|
||||
}
|
||||
@@ -3321,6 +3321,32 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow
|
||||
|
||||
|
||||
+/***********************************************************************
|
||||
/***********************************************************************
|
||||
+ * elevate_process
|
||||
+ */
|
||||
+static void elevate_process( void )
|
||||
@@ -45,19 +44,37 @@ index 3fcbbf77a5..2399f1246e 100644
|
||||
+}
|
||||
+
|
||||
+
|
||||
/***********************************************************************
|
||||
+/***********************************************************************
|
||||
* load_global_options
|
||||
*/
|
||||
@@ -3115,6 +3141,7 @@ void WINAPI LdrInitializeThunk( void *kernel_start, ULONG_PTR unknown2,
|
||||
ULONG_PTR unknown3, ULONG_PTR unknown4 )
|
||||
static void load_global_options(void)
|
||||
@@ -3373,6 +3399,7 @@ static void load_global_options(void)
|
||||
}
|
||||
|
||||
|
||||
+
|
||||
/***********************************************************************
|
||||
* RtlImageDirectoryEntryToData (NTDLL.@)
|
||||
*/
|
||||
@@ -3408,7 +3435,6 @@ PVOID WINAPI RtlImageDirectoryEntryToData( HMODULE module, BOOL image, WORD dir,
|
||||
return RtlImageRvaToVa( nt, module, addr, NULL );
|
||||
}
|
||||
|
||||
-
|
||||
/***********************************************************************
|
||||
* RtlImageRvaToSection (NTDLL.@)
|
||||
*/
|
||||
@@ -3505,7 +3531,7 @@ void __wine_process_init(void)
|
||||
{
|
||||
static const WCHAR kernel32W[] = {'k','e','r','n','e','l','3','2','.','d','l','l',0};
|
||||
static const WCHAR globalflagW[] = {'G','l','o','b','a','l','F','l','a','g',0};
|
||||
-
|
||||
+ ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION runlevel;
|
||||
NTSTATUS status;
|
||||
WINE_MODREF *wm;
|
||||
PEB *peb = NtCurrentTeb()->Peb;
|
||||
@@ -3142,6 +3169,16 @@ void WINAPI LdrInitializeThunk( void *kernel_start, ULONG_PTR unknown2,
|
||||
REG_DWORD, &peb->NtGlobalFlag, sizeof(peb->NtGlobalFlag), NULL );
|
||||
NTSTATUS status;
|
||||
ANSI_STRING func_name;
|
||||
@@ -3556,6 +3582,16 @@ void __wine_process_init(void)
|
||||
&NtCurrentTeb()->Peb->NtGlobalFlag, sizeof(DWORD), NULL );
|
||||
heap_set_debug_flags( GetProcessHeap() );
|
||||
|
||||
+ /* elevate process if necessary */
|
||||
@@ -72,12 +89,12 @@ index 3fcbbf77a5..2399f1246e 100644
|
||||
+
|
||||
/* the main exe needs to be the first in the load order list */
|
||||
RemoveEntryList( &wm->ldr.InLoadOrderModuleList );
|
||||
InsertHeadList( &peb->LdrData->InLoadOrderModuleList, &wm->ldr.InLoadOrderModuleList );
|
||||
InsertHeadList( &NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList, &wm->ldr.InLoadOrderModuleList );
|
||||
diff --git a/server/process.c b/server/process.c
|
||||
index ee85249bd4..81cea2f1ba 100644
|
||||
index 0a25f44..3988b52 100644
|
||||
--- a/server/process.c
|
||||
+++ b/server/process.c
|
||||
@@ -1133,6 +1133,14 @@ struct process_snapshot *process_snap( int *count )
|
||||
@@ -1109,6 +1109,14 @@ struct process_snapshot *process_snap( int *count )
|
||||
return snapshot;
|
||||
}
|
||||
|
||||
@@ -93,10 +110,10 @@ index ee85249bd4..81cea2f1ba 100644
|
||||
DECL_HANDLER(new_process)
|
||||
{
|
||||
diff --git a/server/process.h b/server/process.h
|
||||
index f22c128f07..78e88ec350 100644
|
||||
index 4566a04..029b328 100644
|
||||
--- a/server/process.h
|
||||
+++ b/server/process.h
|
||||
@@ -136,6 +136,7 @@ extern void break_process( struct process *process );
|
||||
@@ -138,6 +138,7 @@ extern void break_process( struct process *process );
|
||||
extern void detach_debugged_processes( struct thread *debugger );
|
||||
extern struct process_snapshot *process_snap( int *count );
|
||||
extern void enum_processes( int (*cb)(struct process*, void*), void *user);
|
||||
@@ -105,10 +122,10 @@ index f22c128f07..78e88ec350 100644
|
||||
/* console functions */
|
||||
extern void inherit_console(struct thread *parent_thread, struct process *process, obj_handle_t hconin);
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 0abd1683f0..5fb6e38ea5 100644
|
||||
index 071f740..cc44503 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3654,6 +3654,13 @@ struct handle_info
|
||||
@@ -3674,6 +3674,13 @@ struct handle_info
|
||||
@END
|
||||
|
||||
|
||||
@@ -123,10 +140,10 @@ index 0abd1683f0..5fb6e38ea5 100644
|
||||
@REQ(create_completion)
|
||||
unsigned int access; /* desired access to a port */
|
||||
diff --git a/server/token.c b/server/token.c
|
||||
index 64ab565a95..52fa10d52e 100644
|
||||
index e449e61..961fbe7 100644
|
||||
--- a/server/token.c
|
||||
+++ b/server/token.c
|
||||
@@ -1802,3 +1802,17 @@ DECL_HANDLER(create_token)
|
||||
@@ -1797,3 +1797,17 @@ DECL_HANDLER(create_token)
|
||||
release_object( token );
|
||||
}
|
||||
}
|
||||
@@ -145,5 +162,5 @@ index 64ab565a95..52fa10d52e 100644
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.16.1
|
||||
1.9.1
|
||||
|
||||
|
@@ -1,26 +1,26 @@
|
||||
From a4d5c33bb2fc98fd0f84ea05575e0d3eeb5a1bcd Mon Sep 17 00:00:00 2001
|
||||
From 9a67b4c62e5a575a38081114d4434f274355020e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 12 Apr 2016 01:02:34 +0200
|
||||
Subject: [PATCH] uiautomationcore: Add dll and stub some functions.
|
||||
|
||||
---
|
||||
dlls/uiautomationcore/Makefile.in | 1 +
|
||||
dlls/uiautomationcore/uia_main.c | 53 +++++++++++++++++++++++++----
|
||||
dlls/uiautomationcore/uiautomationcore.spec | 6 ++++
|
||||
3 files changed, 54 insertions(+), 6 deletions(-)
|
||||
dlls/uiautomationcore/Makefile.in | 1 +
|
||||
dlls/uiautomationcore/uia_main.c | 53 ++++++++++++++++++++++++++++++++++-----
|
||||
2 files changed, 48 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/uiautomationcore/Makefile.in b/dlls/uiautomationcore/Makefile.in
|
||||
index 78d6254..029fc2e 100644
|
||||
index 5221450..5173f23 100644
|
||||
--- a/dlls/uiautomationcore/Makefile.in
|
||||
+++ b/dlls/uiautomationcore/Makefile.in
|
||||
@@ -1,4 +1,5 @@
|
||||
@@ -1,5 +1,6 @@
|
||||
MODULE = uiautomationcore.dll
|
||||
IMPORTLIB = uiautomationcore
|
||||
+IMPORTS = uuid
|
||||
|
||||
C_SRCS = \
|
||||
uia_main.c
|
||||
diff --git a/dlls/uiautomationcore/uia_main.c b/dlls/uiautomationcore/uia_main.c
|
||||
index 31b7d3e..cc4831e 100644
|
||||
index f0d8247..b9c24b4 100644
|
||||
--- a/dlls/uiautomationcore/uia_main.c
|
||||
+++ b/dlls/uiautomationcore/uia_main.c
|
||||
@@ -1,4 +1,5 @@
|
||||
@@ -121,41 +121,6 @@ index 31b7d3e..cc4831e 100644
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff --git a/dlls/uiautomationcore/uiautomationcore.spec b/dlls/uiautomationcore/uiautomationcore.spec
|
||||
index 48a06b2..8e676ad 100644
|
||||
--- a/dlls/uiautomationcore/uiautomationcore.spec
|
||||
+++ b/dlls/uiautomationcore/uiautomationcore.spec
|
||||
@@ -53,6 +53,8 @@
|
||||
@ stub TransformPattern_Rotate
|
||||
@ stub UiaAddEvent
|
||||
@ stdcall UiaClientsAreListening()
|
||||
+@ stub UiaDisconnectAllProviders
|
||||
+@ stub UiaDisconnectProvider
|
||||
@ stub UiaEventAddWindow
|
||||
@ stub UiaEventRemoveWindow
|
||||
@ stub UiaFind
|
||||
@@ -69,6 +71,7 @@
|
||||
@ stub UiaHUiaNodeFromVariant
|
||||
@ stub UiaHasServerSideProvider
|
||||
@ stub UiaHostProviderFromHwnd
|
||||
+@ stub UiaIAccessibleFromProvider
|
||||
@ stdcall UiaLookupId(long ptr)
|
||||
@ stub UiaNavigate
|
||||
@ stub UiaNodeFromFocus
|
||||
@@ -77,10 +80,13 @@
|
||||
@ stub UiaNodeFromProvider
|
||||
@ stub UiaNodeRelease
|
||||
@ stub UiaPatternRelease
|
||||
+@ stub UiaProviderForNonClient
|
||||
+@ stub UiaProviderFromIAccessible
|
||||
@ stub UiaRaiseAsyncContentLoadedEvent
|
||||
@ stdcall UiaRaiseAutomationEvent(ptr long)
|
||||
@ stub UiaRaiseAutomationPropertyChangedEvent
|
||||
@ stub UiaRaiseStructureChangedEvent
|
||||
+@ stub UiaRaiseTextEditTextChangedEvent
|
||||
@ stub UiaRegisterProviderCallback
|
||||
@ stub UiaRemoveEvent
|
||||
@ stdcall UiaReturnRawElementProvider(long long long ptr)
|
||||
--
|
||||
1.9.1
|
||||
|
||||
|
@@ -1,351 +0,0 @@
|
||||
From ff1967f048d2b32ad98e91b4f39edba0c425a8a9 Mon Sep 17 00:00:00 2001
|
||||
From: Jack Grigg <me@jackgrigg.com>
|
||||
Date: Sat, 17 Mar 2018 21:14:05 +1100
|
||||
Subject: [PATCH] bcrypt: Implement BCryptDeriveKeyPBKDF2 and add test vectors.
|
||||
|
||||
Fixes https://bugs.winehq.org/show_bug.cgi?id=42704
|
||||
|
||||
Tested on Ubuntu 16.04.2 LTS.
|
||||
|
||||
v2 - Removed C++ comment
|
||||
- Removed all warnings.
|
||||
- Use heap_* functions
|
||||
- Formatting changes.
|
||||
|
||||
Signed-off-by: Jack Grigg <me@jackgrigg.com>
|
||||
---
|
||||
dlls/bcrypt/bcrypt.spec | 1 +
|
||||
dlls/bcrypt/bcrypt_main.c | 163 +++++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/bcrypt/tests/bcrypt.c | 83 +++++++++++++++++++++++
|
||||
dlls/ncrypt/ncrypt.spec | 2 +-
|
||||
include/bcrypt.h | 1 +
|
||||
5 files changed, 249 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec
|
||||
index 78824d7..f4d9a57 100644
|
||||
--- a/dlls/bcrypt/bcrypt.spec
|
||||
+++ b/dlls/bcrypt/bcrypt.spec
|
||||
@@ -8,6 +8,7 @@
|
||||
@ stdcall BCryptDecrypt(ptr ptr long ptr ptr long ptr long ptr long)
|
||||
@ stub BCryptDeleteContext
|
||||
@ stub BCryptDeriveKey
|
||||
+@ stdcall BCryptDeriveKeyPBKDF2(ptr ptr long ptr long int64 ptr long long)
|
||||
@ stdcall BCryptDestroyHash(ptr)
|
||||
@ stdcall BCryptDestroyKey(ptr)
|
||||
@ stub BCryptDestroySecret
|
||||
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
|
||||
index 2b9ae0b..49ccb13 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -1316,6 +1316,169 @@ NTSTATUS WINAPI BCryptSetProperty( BCRYPT_HANDLE handle, const WCHAR *prop, UCHA
|
||||
}
|
||||
}
|
||||
|
||||
+NTSTATUS PBKDF2_F( BCRYPT_ALG_HANDLE algorithm,
|
||||
+ UCHAR *password, ULONG password_length,
|
||||
+ UCHAR *salt, ULONG salt_length,
|
||||
+ ULONGLONG iterations, int i,
|
||||
+ UCHAR *res, int hash_length )
|
||||
+{
|
||||
+ BCRYPT_HASH_HANDLE handle;
|
||||
+ NTSTATUS status = STATUS_NOT_SUPPORTED;
|
||||
+ UCHAR bytes[4];
|
||||
+ UCHAR *tmp;
|
||||
+ int j;
|
||||
+ int k;
|
||||
+
|
||||
+ if (!(tmp = heap_alloc( hash_length )))
|
||||
+ {
|
||||
+ return STATUS_NO_MEMORY;
|
||||
+ }
|
||||
+
|
||||
+ for (j = 0; j < iterations; j++)
|
||||
+ {
|
||||
+ status = BCryptCreateHash( algorithm, &handle, NULL, 0,
|
||||
+ password, password_length, 0 );
|
||||
+ if (status != STATUS_SUCCESS)
|
||||
+ goto done;
|
||||
+
|
||||
+ if (j == 0)
|
||||
+ {
|
||||
+ /* Use salt || INT(i) */
|
||||
+ status = BCryptHashData( handle, salt, salt_length, 0 );
|
||||
+ if (status != STATUS_SUCCESS)
|
||||
+ goto done;
|
||||
+ bytes[0] = (i >> 24) & 0xFF;
|
||||
+ bytes[1] = (i >> 16) & 0xFF;
|
||||
+ bytes[2] = (i >> 8) & 0xFF;
|
||||
+ bytes[3] = i & 0xFF;
|
||||
+ status = BCryptHashData( handle, bytes, 4, 0 );
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ /* Use U_j */
|
||||
+ status = BCryptHashData( handle, tmp, hash_length, 0 );
|
||||
+ }
|
||||
+ if (status != STATUS_SUCCESS)
|
||||
+ goto done;
|
||||
+
|
||||
+ status = BCryptFinishHash( handle, tmp, hash_length, 0 );
|
||||
+ if (status != STATUS_SUCCESS)
|
||||
+ goto done;
|
||||
+
|
||||
+ status = BCryptDestroyHash( handle );
|
||||
+ if (status != STATUS_SUCCESS)
|
||||
+ goto done;
|
||||
+
|
||||
+ handle = NULL;
|
||||
+
|
||||
+ if (j == 0)
|
||||
+ {
|
||||
+ /* Copy into res */
|
||||
+ memcpy( res, tmp, hash_length );
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ /* XOR into res */
|
||||
+ for (k = 0; k < hash_length; k++)
|
||||
+ res[k] ^= tmp[k];
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+done:
|
||||
+ TRACE("<- status 0x%08x\n", status);
|
||||
+ if(handle)
|
||||
+ BCryptDestroyHash( handle );
|
||||
+ heap_free( tmp );
|
||||
+ return status;
|
||||
+}
|
||||
+
|
||||
+/************************************************************
|
||||
+ * BCryptDeriveKeyPBKDF2 (BCRYPT.@)
|
||||
+ *
|
||||
+ * Derive a key from a password using the PBKDF2 function
|
||||
+ * (RFC 2898).
|
||||
+ *
|
||||
+ * PARAMS
|
||||
+ * handle [I] Pointer to the PRF provider
|
||||
+ * password [I] Optional pointer to the beginning of the password
|
||||
+ * password_length [I] Length of the password
|
||||
+ * salt [I] Optional pointer to the beginning of the salt
|
||||
+ * salt_length [I] Length of the salt
|
||||
+ * iterations [I] Iteration count
|
||||
+ * dk [O] Pointer to the beginning of the buffer to store the
|
||||
+ * derived key in, at least dklen in size
|
||||
+ * dklen [I] Intended length of the derived key, at most
|
||||
+ * (2^32 - 1) * (output length of PRF)
|
||||
+ * flags [I] Reserved, must be zero
|
||||
+ *
|
||||
+ * RETURNS
|
||||
+ * Success: STATUS_SUCCESS.
|
||||
+ * Failure: - STATUS_INVALID_HANDLE
|
||||
+ * - STATUS_INVALID_PARAMETER
|
||||
+ * - STATUS_NO_MEMORY
|
||||
+ */
|
||||
+NTSTATUS WINAPI BCryptDeriveKeyPBKDF2( BCRYPT_ALG_HANDLE handle,
|
||||
+ PUCHAR password, ULONG password_length,
|
||||
+ PUCHAR salt, ULONG salt_length,
|
||||
+ ULONGLONG iterations,
|
||||
+ PUCHAR dk, ULONG dklen,
|
||||
+ ULONG flags )
|
||||
+{
|
||||
+ struct algorithm *alg = handle;
|
||||
+ int hlen = alg_props[alg->id].hash_length;
|
||||
+ UCHAR *partial;
|
||||
+ NTSTATUS status;
|
||||
+ int l;
|
||||
+ int r;
|
||||
+ int i;
|
||||
+
|
||||
+ TRACE( "%p, %p, %u, %p, %u, %s, %p, %u, %08x - stub\n",
|
||||
+ handle, password, password_length, salt, salt_length,
|
||||
+ wine_dbgstr_longlong(iterations), dk, dklen, flags );
|
||||
+
|
||||
+ if (dklen <= 0 || dklen > ((((ULONGLONG) 1) << 32) - 1) * hlen)
|
||||
+ {
|
||||
+ return STATUS_INVALID_PARAMETER;
|
||||
+ }
|
||||
+
|
||||
+ l = 1 + ((dklen - 1) / hlen); /* ceil(dklen/hlen) */
|
||||
+ r = dklen - (l - 1) * hlen;
|
||||
+
|
||||
+ /* Full blocks */
|
||||
+ for (i = 1; i < l; i++)
|
||||
+ {
|
||||
+ status = PBKDF2_F( handle,
|
||||
+ password, password_length,
|
||||
+ salt, salt_length,
|
||||
+ iterations, i,
|
||||
+ dk + ((i - 1) * hlen), hlen );
|
||||
+ if (status != STATUS_SUCCESS)
|
||||
+ {
|
||||
+ return status;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* Final partial block */
|
||||
+ if (!(partial = heap_alloc( hlen )))
|
||||
+ {
|
||||
+ return STATUS_NO_MEMORY;
|
||||
+ }
|
||||
+ status = PBKDF2_F( handle,
|
||||
+ password, password_length,
|
||||
+ salt, salt_length,
|
||||
+ iterations, l,
|
||||
+ partial, hlen );
|
||||
+ if (status != STATUS_SUCCESS)
|
||||
+ {
|
||||
+ heap_free( partial );
|
||||
+ return status;
|
||||
+ }
|
||||
+ memcpy( dk + ((l - 1) * hlen), partial, r );
|
||||
+ heap_free( partial );
|
||||
+
|
||||
+ return STATUS_SUCCESS;
|
||||
+}
|
||||
+
|
||||
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
|
||||
{
|
||||
switch (reason)
|
||||
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
|
||||
index 6865e87..5c4df6a 100644
|
||||
--- a/dlls/bcrypt/tests/bcrypt.c
|
||||
+++ b/dlls/bcrypt/tests/bcrypt.c
|
||||
@@ -36,6 +36,8 @@ static NTSTATUS (WINAPI *pBCryptHashData)(BCRYPT_HASH_HANDLE, PUCHAR, ULONG, ULO
|
||||
static NTSTATUS (WINAPI *pBCryptDuplicateHash)(BCRYPT_HASH_HANDLE, BCRYPT_HASH_HANDLE *, UCHAR *, ULONG, ULONG);
|
||||
static NTSTATUS (WINAPI *pBCryptFinishHash)(BCRYPT_HASH_HANDLE, PUCHAR, ULONG, ULONG);
|
||||
static NTSTATUS (WINAPI *pBCryptDestroyHash)(BCRYPT_HASH_HANDLE);
|
||||
+static NTSTATUS (WINAPI *pBCryptDeriveKeyPBKDF2)(BCRYPT_ALG_HANDLE, PUCHAR, ULONG, PUCHAR, ULONG,
|
||||
+ ULONGLONG, PUCHAR, ULONG, ULONG);
|
||||
static NTSTATUS (WINAPI *pBCryptGenRandom)(BCRYPT_ALG_HANDLE, PUCHAR, ULONG, ULONG);
|
||||
static NTSTATUS (WINAPI *pBCryptGetProperty)(BCRYPT_HANDLE, LPCWSTR, PUCHAR, ULONG, ULONG *, ULONG);
|
||||
static NTSTATUS (WINAPI *pBCryptSetProperty)(BCRYPT_HANDLE, LPCWSTR, PUCHAR, ULONG, ULONG);
|
||||
@@ -396,6 +398,81 @@ static void test_BcryptHash(void)
|
||||
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
|
||||
}
|
||||
|
||||
+/* Test vectors from RFC 6070 */
|
||||
+static UCHAR password[] = "password";
|
||||
+static UCHAR salt[] = "salt";
|
||||
+static UCHAR long_password[] =
|
||||
+ "passwordPASSWORDpassword";
|
||||
+static UCHAR long_salt[] =
|
||||
+ "saltSALTsaltSALTsaltSALTsaltSALTsalt";
|
||||
+static UCHAR password_NUL[] = "pass\0word";
|
||||
+static UCHAR salt_NUL[] = "sa\0lt";
|
||||
+
|
||||
+static UCHAR dk1[] =
|
||||
+ "0c60c80f961f0e71f3a9b524af6012062fe037a6";
|
||||
+static UCHAR dk2[] =
|
||||
+ "ea6c014dc72d6f8ccd1ed92ace1d41f0d8de8957";
|
||||
+static UCHAR dk3[] =
|
||||
+ "4b007901b765489abead49d926f721d065a429c1";
|
||||
+static UCHAR dk4[] =
|
||||
+ "eefe3d61cd4da4e4e9945b3d6ba2158c2634e984";
|
||||
+static UCHAR dk5[] =
|
||||
+ "3d2eec4fe41c849b80c8d83662c0e44a8b291a964cf2f07038";
|
||||
+static UCHAR dk6[] =
|
||||
+ "56fa6aa75548099dcc37d7f03425e0c3";
|
||||
+
|
||||
+static const struct {
|
||||
+ ULONG password_length;
|
||||
+ ULONG salt_length;
|
||||
+ ULONGLONG iterations;
|
||||
+ ULONG dklen;
|
||||
+ UCHAR *password;
|
||||
+ UCHAR *salt;
|
||||
+ const UCHAR *dk;
|
||||
+} rfc6070[] = {
|
||||
+ { 8, 4, 1, 20, password, salt, dk1 },
|
||||
+ { 8, 4, 2, 20, password, salt, dk2 },
|
||||
+ { 8, 4, 4096, 20, password, salt, dk3 },
|
||||
+ { 8, 4, 16777216, 20, password, salt, dk4 },
|
||||
+ { 24, 36, 4096, 25, long_password, long_salt, dk5 },
|
||||
+ { 9, 5, 4096, 16, password_NUL, salt_NUL, dk6 }
|
||||
+};
|
||||
+
|
||||
+static void test_BcryptDeriveKeyPBKDF2(void)
|
||||
+{
|
||||
+ BCRYPT_ALG_HANDLE alg;
|
||||
+ UCHAR dk[25];
|
||||
+ char str[51];
|
||||
+ NTSTATUS ret;
|
||||
+ int i;
|
||||
+
|
||||
+ alg = NULL;
|
||||
+ ret = pBCryptOpenAlgorithmProvider(&alg, BCRYPT_SHA1_ALGORITHM, MS_PRIMITIVE_PROVIDER,
|
||||
+ BCRYPT_ALG_HANDLE_HMAC_FLAG);
|
||||
+ ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
|
||||
+ ok(alg != NULL, "alg not set\n");
|
||||
+
|
||||
+ test_hash_length(alg, 20);
|
||||
+ test_alg_name(alg, "SHA1");
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(rfc6070); i++)
|
||||
+ {
|
||||
+ memset(dk, 0, sizeof(dk));
|
||||
+ ret = pBCryptDeriveKeyPBKDF2(alg,
|
||||
+ rfc6070[i].password, rfc6070[i].password_length,
|
||||
+ rfc6070[i].salt, rfc6070[i].salt_length,
|
||||
+ rfc6070[i].iterations,
|
||||
+ dk, rfc6070[i].dklen,
|
||||
+ 0);
|
||||
+ ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
|
||||
+ format_hash( dk, rfc6070[i].dklen, str );
|
||||
+ ok(!memcmp(str, rfc6070[i].dk, rfc6070[i].dklen), "got %s\n", str);
|
||||
+ }
|
||||
+
|
||||
+ ret = pBCryptCloseAlgorithmProvider(alg, 0);
|
||||
+ ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
|
||||
+}
|
||||
+
|
||||
static void test_rng(void)
|
||||
{
|
||||
BCRYPT_ALG_HANDLE alg;
|
||||
@@ -1630,6 +1707,7 @@ START_TEST(bcrypt)
|
||||
pBCryptDuplicateHash = (void *)GetProcAddress(module, "BCryptDuplicateHash");
|
||||
pBCryptFinishHash = (void *)GetProcAddress(module, "BCryptFinishHash");
|
||||
pBCryptDestroyHash = (void *)GetProcAddress(module, "BCryptDestroyHash");
|
||||
+ pBCryptDeriveKeyPBKDF2 = (void *)GetProcAddress(module, "BCryptDeriveKeyPBKDF2");
|
||||
pBCryptGenRandom = (void *)GetProcAddress(module, "BCryptGenRandom");
|
||||
pBCryptGetProperty = (void *)GetProcAddress(module, "BCryptGetProperty");
|
||||
pBCryptSetProperty = (void *)GetProcAddress(module, "BCryptSetProperty");
|
||||
@@ -1660,5 +1738,10 @@ START_TEST(bcrypt)
|
||||
else
|
||||
win_skip("BCryptHash is not available\n");
|
||||
|
||||
+ if (pBCryptDeriveKeyPBKDF2) /* >= Win 7 */
|
||||
+ test_BcryptDeriveKeyPBKDF2();
|
||||
+ else
|
||||
+ win_skip("BCryptDeriveKeyPBKDF2 is not available\n");
|
||||
+
|
||||
FreeLibrary(module);
|
||||
}
|
||||
diff --git a/dlls/ncrypt/ncrypt.spec b/dlls/ncrypt/ncrypt.spec
|
||||
index e7b12e0..adc0999 100644
|
||||
--- a/dlls/ncrypt/ncrypt.spec
|
||||
+++ b/dlls/ncrypt/ncrypt.spec
|
||||
@@ -9,7 +9,7 @@
|
||||
@ stub BCryptDeleteContext
|
||||
@ stub BCryptDeriveKey
|
||||
@ stub BCryptDeriveKeyCapi
|
||||
-@ stub BCryptDeriveKeyPBKDF2
|
||||
+@ stdcall BCryptDeriveKeyPBKDF2(ptr ptr long ptr long int64 ptr long long) bcrypt.BCryptDeriveKeyPBKDF2
|
||||
@ stdcall BCryptDestroyHash(ptr) bcrypt.BCryptDestroyHash
|
||||
@ stdcall BCryptDestroyKey(ptr) bcrypt.BCryptDestroyKey
|
||||
@ stub BCryptDestroySecret
|
||||
diff --git a/include/bcrypt.h b/include/bcrypt.h
|
||||
index df54f62..d3e4b99 100644
|
||||
--- a/include/bcrypt.h
|
||||
+++ b/include/bcrypt.h
|
||||
@@ -217,6 +217,7 @@ typedef PVOID BCRYPT_HASH_HANDLE;
|
||||
NTSTATUS WINAPI BCryptCloseAlgorithmProvider(BCRYPT_ALG_HANDLE, ULONG);
|
||||
NTSTATUS WINAPI BCryptCreateHash(BCRYPT_ALG_HANDLE, BCRYPT_HASH_HANDLE *, PUCHAR, ULONG, PUCHAR, ULONG, ULONG);
|
||||
NTSTATUS WINAPI BCryptDecrypt(BCRYPT_KEY_HANDLE, PUCHAR, ULONG, VOID *, PUCHAR, ULONG, PUCHAR, ULONG, ULONG *, ULONG);
|
||||
+NTSTATUS WINAPI BCryptDeriveKeyPBKDF2(BCRYPT_ALG_HANDLE, PUCHAR, ULONG, PUCHAR, ULONG, ULONGLONG, PUCHAR, ULONG, ULONG);
|
||||
NTSTATUS WINAPI BCryptDestroyHash(BCRYPT_HASH_HANDLE);
|
||||
NTSTATUS WINAPI BCryptDestroyKey(BCRYPT_KEY_HANDLE);
|
||||
NTSTATUS WINAPI BCryptEncrypt(BCRYPT_KEY_HANDLE, PUCHAR, ULONG, VOID *, PUCHAR, ULONG, PUCHAR, ULONG, ULONG *, ULONG);
|
||||
--
|
||||
1.9.1
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [42704] Implement BCryptDeriveKeyPBKDF2
|
@@ -1,58 +0,0 @@
|
||||
From ee38b7a672771d088ee5c4e58300623259020fb6 Mon Sep 17 00:00:00 2001
|
||||
From: Maxime Lombard <berillions@gmail.com>
|
||||
Date: Sun, 10 Jun 2018 14:47:01 +0200
|
||||
Subject: [PATCH 1/3] bcrypt: Add support for algorithm ECDH P256.
|
||||
|
||||
---
|
||||
dlls/bcrypt/bcrypt_internal.h | 1 +
|
||||
dlls/bcrypt/bcrypt_main.c | 2 ++
|
||||
include/bcrypt.h | 1 +
|
||||
3 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/dlls/bcrypt/bcrypt_internal.h b/dlls/bcrypt/bcrypt_internal.h
|
||||
index 11c8b30..fd8cc90 100644
|
||||
--- a/dlls/bcrypt/bcrypt_internal.h
|
||||
+++ b/dlls/bcrypt/bcrypt_internal.h
|
||||
@@ -137,6 +137,7 @@ enum alg_id
|
||||
ALG_ID_SHA256,
|
||||
ALG_ID_SHA384,
|
||||
ALG_ID_SHA512,
|
||||
+ ALG_ID_ECDH_P256,
|
||||
ALG_ID_ECDSA_P256,
|
||||
ALG_ID_ECDSA_P384,
|
||||
};
|
||||
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
|
||||
index 24065c1..003e8f3 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -114,6 +114,7 @@ alg_props[] =
|
||||
/* ALG_ID_SHA256 */ { 286, 32, 512, BCRYPT_SHA256_ALGORITHM, FALSE },
|
||||
/* ALG_ID_SHA384 */ { 382, 48, 1024, BCRYPT_SHA384_ALGORITHM, FALSE },
|
||||
/* ALG_ID_SHA512 */ { 382, 64, 1024, BCRYPT_SHA512_ALGORITHM, FALSE },
|
||||
+ /* ALG_ID_ECDH_P256 */ { 0, 0, 0, BCRYPT_ECDH_P256_ALGORITHM, FALSE },
|
||||
/* ALG_ID_ECDSA_P256 */ { 0, 0, 0, BCRYPT_ECDSA_P256_ALGORITHM, FALSE },
|
||||
/* ALG_ID_ECDSA_P384 */ { 0, 0, 0, BCRYPT_ECDSA_P384_ALGORITHM, FALSE },
|
||||
};
|
||||
@@ -184,6 +185,7 @@ 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;
|
||||
+ else if (!strcmpW( id, BCRYPT_ECDH_P256_ALGORITHM )) alg_id = ALG_ID_ECDH_P256;
|
||||
else if (!strcmpW( id, BCRYPT_ECDSA_P256_ALGORITHM )) alg_id = ALG_ID_ECDSA_P256;
|
||||
else if (!strcmpW( id, BCRYPT_ECDSA_P384_ALGORITHM )) alg_id = ALG_ID_ECDSA_P384;
|
||||
else
|
||||
diff --git a/include/bcrypt.h b/include/bcrypt.h
|
||||
index d3e4b99..676db72 100644
|
||||
--- a/include/bcrypt.h
|
||||
+++ b/include/bcrypt.h
|
||||
@@ -81,6 +81,7 @@ 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}
|
||||
+#define BCRYPT_ECDH_P256_ALGORITHM (const WCHAR []){'E','C','D','H','_','P','2','5','6',0}
|
||||
#define BCRYPT_ECDSA_P256_ALGORITHM (const WCHAR []){'E','C','D','S','A','_','P','2','5','6',0}
|
||||
#define BCRYPT_ECDSA_P384_ALGORITHM (const WCHAR []){'E','C','D','S','A','_','P','3','8','4',0}
|
||||
#define BCRYPT_ECDSA_P521_ALGORITHM (const WCHAR []){'E','C','D','S','A','_','P','5','2','1',0}
|
||||
--
|
||||
1.9.1
|
||||
|
@@ -1,70 +0,0 @@
|
||||
From 480ec9b4f559237e618ede31ecd158340783ab80 Mon Sep 17 00:00:00 2001
|
||||
From: Maxime Lombard <berillions@gmail.com>
|
||||
Date: Sun, 10 Jun 2018 14:50:31 +0200
|
||||
Subject: [PATCH 2/3] bcrypt: Add BCryptGenerateKeyPair stub.
|
||||
|
||||
---
|
||||
dlls/bcrypt/bcrypt.spec | 2 +-
|
||||
dlls/bcrypt/bcrypt_main.c | 6 ++++++
|
||||
dlls/ncrypt/ncrypt.spec | 2 +-
|
||||
include/bcrypt.h | 1 +
|
||||
4 files changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec
|
||||
index 78824d7..ccfec63 100644
|
||||
--- a/dlls/bcrypt/bcrypt.spec
|
||||
+++ b/dlls/bcrypt/bcrypt.spec
|
||||
@@ -25,7 +25,7 @@
|
||||
@ stdcall BCryptFinishHash(ptr ptr long long)
|
||||
@ stub BCryptFreeBuffer
|
||||
@ stdcall BCryptGenRandom(ptr ptr long long)
|
||||
-@ stub BCryptGenerateKeyPair
|
||||
+@ stdcall BCryptGenerateKeyPair(ptr ptr long long)
|
||||
@ stdcall BCryptGenerateSymmetricKey(ptr ptr ptr long ptr long long)
|
||||
@ stdcall BCryptGetFipsAlgorithmMode(ptr)
|
||||
@ stdcall BCryptGetProperty(ptr wstr ptr long ptr long)
|
||||
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
|
||||
index 0381b65..623ccb5 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -160,6 +160,12 @@ NTSTATUS WINAPI BCryptGenRandom(BCRYPT_ALG_HANDLE handle, UCHAR *buffer, ULONG c
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
+NTSTATUS WINAPI BCryptGenerateKeyPair(BCRYPT_ALG_HANDLE algorithm, BCRYPT_KEY_HANDLE *handle, ULONG input_len, ULONG flags)
|
||||
+{
|
||||
+ FIXME("%p, %p, %u, %08x - stub\n", algorithm, handle, input_len, flags);
|
||||
+ return STATUS_SUCCESS;
|
||||
+}
|
||||
+
|
||||
NTSTATUS WINAPI BCryptOpenAlgorithmProvider( BCRYPT_ALG_HANDLE *handle, LPCWSTR id, LPCWSTR implementation, DWORD flags )
|
||||
{
|
||||
const DWORD supported_flags = BCRYPT_ALG_HANDLE_HMAC_FLAG;
|
||||
diff --git a/dlls/ncrypt/ncrypt.spec b/dlls/ncrypt/ncrypt.spec
|
||||
index e7b12e0..e667e75 100644
|
||||
--- a/dlls/ncrypt/ncrypt.spec
|
||||
+++ b/dlls/ncrypt/ncrypt.spec
|
||||
@@ -27,7 +27,7 @@
|
||||
@ stdcall BCryptFinishHash(ptr ptr long long) bcrypt.BCryptFinishHash
|
||||
@ stub BCryptFreeBuffer
|
||||
@ stdcall BCryptGenRandom(ptr ptr long long) bcrypt.BCryptGenRandom
|
||||
-@ stub BCryptGenerateKeyPair
|
||||
+@ stdcall BCryptGenerateKeyPair(ptr ptr long long) bcrypt.BCryptGenerateKeyPair
|
||||
@ stdcall BCryptGenerateSymmetricKey(ptr ptr ptr long ptr long long) bcrypt.BCryptGenerateSymmetricKey
|
||||
@ stdcall BCryptGetFipsAlgorithmMode(ptr) bcrypt.BCryptGetFipsAlgorithmMode
|
||||
@ stdcall BCryptGetProperty(ptr wstr ptr long ptr long) bcrypt.BCryptGetProperty
|
||||
diff --git a/include/bcrypt.h b/include/bcrypt.h
|
||||
index 7966f76..2ef073b 100644
|
||||
--- a/include/bcrypt.h
|
||||
+++ b/include/bcrypt.h
|
||||
@@ -223,6 +223,7 @@ NTSTATUS WINAPI BCryptDestroyKey(BCRYPT_KEY_HANDLE);
|
||||
NTSTATUS WINAPI BCryptEncrypt(BCRYPT_KEY_HANDLE, PUCHAR, ULONG, VOID *, PUCHAR, ULONG, PUCHAR, ULONG, ULONG *, ULONG);
|
||||
NTSTATUS WINAPI BCryptEnumAlgorithms(ULONG, ULONG *, BCRYPT_ALGORITHM_IDENTIFIER **, ULONG);
|
||||
NTSTATUS WINAPI BCryptFinishHash(BCRYPT_HASH_HANDLE, PUCHAR, ULONG, ULONG);
|
||||
+NTSTATUS WINAPI BCryptGenerateKeyPair(BCRYPT_ALG_HANDLE, BCRYPT_KEY_HANDLE *, ULONG, ULONG);
|
||||
NTSTATUS WINAPI BCryptGenerateSymmetricKey(BCRYPT_ALG_HANDLE, BCRYPT_KEY_HANDLE *, PUCHAR, ULONG, PUCHAR, ULONG, ULONG);
|
||||
NTSTATUS WINAPI BCryptGenRandom(BCRYPT_ALG_HANDLE, PUCHAR, ULONG, ULONG);
|
||||
NTSTATUS WINAPI BCryptGetFipsAlgorithmMode(BOOLEAN *);
|
||||
--
|
||||
1.9.1
|
||||
|
@@ -1,70 +0,0 @@
|
||||
From e765bec7193e3ffa27492abe76ed4e56db0f4fc7 Mon Sep 17 00:00:00 2001
|
||||
From: Maxime Lombard <berillions@gmail.com>
|
||||
Date: Sun, 10 Jun 2018 14:52:31 +0200
|
||||
Subject: [PATCH 3/3] bcrypt: Add BCryptFinalizeKeyPair stub.
|
||||
|
||||
---
|
||||
dlls/bcrypt/bcrypt.spec | 2 +-
|
||||
dlls/bcrypt/bcrypt_main.c | 6 ++++++
|
||||
dlls/ncrypt/ncrypt.spec | 2 +-
|
||||
include/bcrypt.h | 1 +
|
||||
4 files changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec
|
||||
index ccfec63..891381f 100644
|
||||
--- a/dlls/bcrypt/bcrypt.spec
|
||||
+++ b/dlls/bcrypt/bcrypt.spec
|
||||
@@ -21,7 +21,7 @@
|
||||
@ stub BCryptEnumProviders
|
||||
@ stub BCryptEnumRegisteredProviders
|
||||
@ stdcall BCryptExportKey(ptr ptr wstr ptr long ptr long)
|
||||
-@ stub BCryptFinalizeKeyPair
|
||||
+@ stdcall BCryptFinalizeKeyPair(ptr long)
|
||||
@ stdcall BCryptFinishHash(ptr ptr long long)
|
||||
@ stub BCryptFreeBuffer
|
||||
@ stdcall BCryptGenRandom(ptr ptr long long)
|
||||
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
|
||||
index 623ccb5..90af6aa 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -166,6 +166,12 @@ NTSTATUS WINAPI BCryptGenerateKeyPair(BCRYPT_ALG_HANDLE algorithm, BCRYPT_KEY_HA
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
+NTSTATUS WINAPI BCryptFinalizeKeyPair(BCRYPT_KEY_HANDLE key, ULONG dwflags)
|
||||
+{
|
||||
+ FIXME("%p, %08x - stub\n", key, dwflags);
|
||||
+ return STATUS_SUCCESS;
|
||||
+}
|
||||
+
|
||||
NTSTATUS WINAPI BCryptOpenAlgorithmProvider( BCRYPT_ALG_HANDLE *handle, LPCWSTR id, LPCWSTR implementation, DWORD flags )
|
||||
{
|
||||
const DWORD supported_flags = BCRYPT_ALG_HANDLE_HMAC_FLAG;
|
||||
diff --git a/dlls/ncrypt/ncrypt.spec b/dlls/ncrypt/ncrypt.spec
|
||||
index e667e75..c6e7f7f 100644
|
||||
--- a/dlls/ncrypt/ncrypt.spec
|
||||
+++ b/dlls/ncrypt/ncrypt.spec
|
||||
@@ -23,7 +23,7 @@
|
||||
@ stub BCryptEnumProviders
|
||||
@ stub BCryptEnumRegisteredProviders
|
||||
@ stdcall BCryptExportKey(ptr ptr wstr ptr long ptr long) bcrypt.BCryptExportKey
|
||||
-@ stub BCryptFinalizeKeyPair
|
||||
+@ stdcall BCryptFinalizeKeyPair(ptr long) bcrypt.BCryptFinalizeKeyPair
|
||||
@ stdcall BCryptFinishHash(ptr ptr long long) bcrypt.BCryptFinishHash
|
||||
@ stub BCryptFreeBuffer
|
||||
@ stdcall BCryptGenRandom(ptr ptr long long) bcrypt.BCryptGenRandom
|
||||
diff --git a/include/bcrypt.h b/include/bcrypt.h
|
||||
index 2ef073b..6826c86 100644
|
||||
--- a/include/bcrypt.h
|
||||
+++ b/include/bcrypt.h
|
||||
@@ -222,6 +222,7 @@ NTSTATUS WINAPI BCryptDestroyHash(BCRYPT_HASH_HANDLE);
|
||||
NTSTATUS WINAPI BCryptDestroyKey(BCRYPT_KEY_HANDLE);
|
||||
NTSTATUS WINAPI BCryptEncrypt(BCRYPT_KEY_HANDLE, PUCHAR, ULONG, VOID *, PUCHAR, ULONG, PUCHAR, ULONG, ULONG *, ULONG);
|
||||
NTSTATUS WINAPI BCryptEnumAlgorithms(ULONG, ULONG *, BCRYPT_ALGORITHM_IDENTIFIER **, ULONG);
|
||||
+NTSTATUS WINAPI BCryptFinalizeKeyPair(BCRYPT_KEY_HANDLE, ULONG);
|
||||
NTSTATUS WINAPI BCryptFinishHash(BCRYPT_HASH_HANDLE, PUCHAR, ULONG, ULONG);
|
||||
NTSTATUS WINAPI BCryptGenerateKeyPair(BCRYPT_ALG_HANDLE, BCRYPT_KEY_HANDLE *, ULONG, ULONG);
|
||||
NTSTATUS WINAPI BCryptGenerateSymmetricKey(BCRYPT_ALG_HANDLE, BCRYPT_KEY_HANDLE *, PUCHAR, ULONG, PUCHAR, ULONG, ULONG);
|
||||
--
|
||||
1.9.1
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [45312] Fix issue for Assassin's Creed : Syndicate
|
@@ -0,0 +1,91 @@
|
||||
From 72d00367b9863fd84d47623b6811552e155fca84 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 5 Feb 2019 10:00:26 +1100
|
||||
Subject: [PATCH] bcrypt: Add BCryptDestroySecret/BCryptSecretAgreement stubs
|
||||
|
||||
---
|
||||
dlls/bcrypt/bcrypt.spec | 4 ++--
|
||||
dlls/bcrypt/bcrypt_main.c | 16 ++++++++++++++++
|
||||
include/bcrypt.h | 3 +++
|
||||
3 files changed, 21 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec
|
||||
index 052a099..dfe08e7 100644
|
||||
--- a/dlls/bcrypt/bcrypt.spec
|
||||
+++ b/dlls/bcrypt/bcrypt.spec
|
||||
@@ -11,7 +11,7 @@
|
||||
@ stdcall BCryptDeriveKeyPBKDF2(ptr ptr long ptr long int64 ptr long long)
|
||||
@ stdcall BCryptDestroyHash(ptr)
|
||||
@ stdcall BCryptDestroyKey(ptr)
|
||||
-@ stub BCryptDestroySecret
|
||||
+@ stdcall BCryptDestroySecret(ptr)
|
||||
@ stdcall BCryptDuplicateHash(ptr ptr ptr long long)
|
||||
@ stdcall BCryptDuplicateKey(ptr ptr ptr long long)
|
||||
@ stdcall BCryptEncrypt(ptr ptr long ptr ptr long ptr long ptr long)
|
||||
@@ -44,7 +44,7 @@
|
||||
@ stdcall BCryptRemoveContextFunction(long wstr long wstr)
|
||||
@ stdcall BCryptRemoveContextFunctionProvider(long wstr long wstr wstr)
|
||||
@ stub BCryptResolveProviders
|
||||
-@ stub BCryptSecretAgreement
|
||||
+@ stdcall BCryptSecretAgreement(ptr ptr ptr long)
|
||||
@ stub BCryptSetAuditingInterface
|
||||
@ stub BCryptSetContextFunctionProperty
|
||||
@ stdcall BCryptSetProperty(ptr wstr ptr long long)
|
||||
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
|
||||
index 80bd14b..36451c9 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -1556,6 +1556,22 @@ NTSTATUS WINAPI BCryptDeriveKeyPBKDF2( BCRYPT_ALG_HANDLE handle,
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
+NTSTATUS WINAPI BCryptSecretAgreement(BCRYPT_KEY_HANDLE handle, BCRYPT_KEY_HANDLE key, BCRYPT_SECRET_HANDLE *secret, ULONG flags)
|
||||
+{
|
||||
+ FIXME( "%p, %p, %p, %08x\n", handle, key, secret, flags );
|
||||
+
|
||||
+ if(secret)
|
||||
+ *secret = (BCRYPT_SECRET_HANDLE *)0xDEADFEED;
|
||||
+
|
||||
+ return STATUS_SUCCESS;
|
||||
+}
|
||||
+
|
||||
+NTSTATUS WINAPI BCryptDestroySecret(BCRYPT_SECRET_HANDLE secret)
|
||||
+{
|
||||
+ FIXME( "%p\n", secret );
|
||||
+ return STATUS_SUCCESS;
|
||||
+}
|
||||
+
|
||||
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
|
||||
{
|
||||
switch (reason)
|
||||
diff --git a/include/bcrypt.h b/include/bcrypt.h
|
||||
index ba78c1d..866914c 100644
|
||||
--- a/include/bcrypt.h
|
||||
+++ b/include/bcrypt.h
|
||||
@@ -211,6 +211,7 @@ typedef PVOID BCRYPT_ALG_HANDLE;
|
||||
typedef PVOID BCRYPT_KEY_HANDLE;
|
||||
typedef PVOID BCRYPT_HANDLE;
|
||||
typedef PVOID BCRYPT_HASH_HANDLE;
|
||||
+typedef PVOID BCRYPT_SECRET_HANDLE;
|
||||
|
||||
/* Flags for BCryptGenRandom */
|
||||
#define BCRYPT_RNG_USE_ENTROPY_IN_BUFFER 0x00000001
|
||||
@@ -228,6 +229,7 @@ NTSTATUS WINAPI BCryptDecrypt(BCRYPT_KEY_HANDLE, PUCHAR, ULONG, VOID *, PUCHAR,
|
||||
NTSTATUS WINAPI BCryptDeriveKeyPBKDF2(BCRYPT_ALG_HANDLE, PUCHAR, ULONG, PUCHAR, ULONG, ULONGLONG, PUCHAR, ULONG, ULONG);
|
||||
NTSTATUS WINAPI BCryptDestroyHash(BCRYPT_HASH_HANDLE);
|
||||
NTSTATUS WINAPI BCryptDestroyKey(BCRYPT_KEY_HANDLE);
|
||||
+NTSTATUS WINAPI BCryptDestroySecret(BCRYPT_SECRET_HANDLE);
|
||||
NTSTATUS WINAPI BCryptDuplicateHash(BCRYPT_HASH_HANDLE, BCRYPT_HASH_HANDLE *, UCHAR *, ULONG, ULONG);
|
||||
NTSTATUS WINAPI BCryptEncrypt(BCRYPT_KEY_HANDLE, PUCHAR, ULONG, VOID *, PUCHAR, ULONG, PUCHAR, ULONG, ULONG *, ULONG);
|
||||
NTSTATUS WINAPI BCryptEnumAlgorithms(ULONG, ULONG *, BCRYPT_ALGORITHM_IDENTIFIER **, ULONG);
|
||||
@@ -242,6 +244,7 @@ NTSTATUS WINAPI BCryptHash(BCRYPT_ALG_HANDLE, PUCHAR, ULONG, PUCHAR, ULONG, PUCH
|
||||
NTSTATUS WINAPI BCryptHashData(BCRYPT_HASH_HANDLE, PUCHAR, ULONG, ULONG);
|
||||
NTSTATUS WINAPI BCryptImportKeyPair(BCRYPT_ALG_HANDLE, BCRYPT_KEY_HANDLE, LPCWSTR, BCRYPT_KEY_HANDLE *, UCHAR *, ULONG, ULONG);
|
||||
NTSTATUS WINAPI BCryptOpenAlgorithmProvider(BCRYPT_ALG_HANDLE *, LPCWSTR, LPCWSTR, ULONG);
|
||||
+NTSTATUS WINAPI BCryptSecretAgreement(BCRYPT_KEY_HANDLE, BCRYPT_KEY_HANDLE, BCRYPT_SECRET_HANDLE *, ULONG);
|
||||
NTSTATUS WINAPI BCryptSetProperty(BCRYPT_HANDLE, LPCWSTR, PUCHAR, ULONG, ULONG);
|
||||
NTSTATUS WINAPI BCryptVerifySignature(BCRYPT_KEY_HANDLE, void *, UCHAR *, ULONG, UCHAR *, ULONG, ULONG);
|
||||
|
||||
--
|
||||
1.9.1
|
||||
|
@@ -0,0 +1,78 @@
|
||||
From 315b52406fbddcaf9289b2a47e8498fba49f8278 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 5 Feb 2019 10:09:59 +1100
|
||||
Subject: [PATCH] bcrypt: Add BCryptDeriveKey stub
|
||||
|
||||
---
|
||||
dlls/bcrypt/bcrypt.spec | 2 +-
|
||||
dlls/bcrypt/bcrypt_main.c | 7 +++++++
|
||||
include/bcrypt.h | 15 +++++++++++++++
|
||||
3 files changed, 23 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec
|
||||
index dfe08e7..4946ee5 100644
|
||||
--- a/dlls/bcrypt/bcrypt.spec
|
||||
+++ b/dlls/bcrypt/bcrypt.spec
|
||||
@@ -7,7 +7,7 @@
|
||||
@ stdcall BCryptCreateHash(ptr ptr ptr long ptr long long)
|
||||
@ stdcall BCryptDecrypt(ptr ptr long ptr ptr long ptr long ptr long)
|
||||
@ stub BCryptDeleteContext
|
||||
-@ stub BCryptDeriveKey
|
||||
+@ stdcall BCryptDeriveKey(ptr wstr ptr ptr long ptr long)
|
||||
@ stdcall BCryptDeriveKeyPBKDF2(ptr ptr long ptr long int64 ptr long long)
|
||||
@ stdcall BCryptDestroyHash(ptr)
|
||||
@ stdcall BCryptDestroyKey(ptr)
|
||||
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
|
||||
index 36451c9..ca2f274 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -1572,6 +1572,13 @@ NTSTATUS WINAPI BCryptDestroySecret(BCRYPT_SECRET_HANDLE secret)
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
+NTSTATUS WINAPI BCryptDeriveKey(BCRYPT_SECRET_HANDLE secret, LPCWSTR kdf, BCryptBufferDesc *parameter,
|
||||
+ PUCHAR derived, ULONG derived_size, ULONG *result, ULONG flags)
|
||||
+{
|
||||
+ FIXME( "%p, %s, %p, %p, %d, %p, %08x\n", secret, debugstr_w(kdf), parameter, derived, derived_size, result, flags );
|
||||
+ return STATUS_INTERNAL_ERROR;
|
||||
+}
|
||||
+
|
||||
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
|
||||
{
|
||||
switch (reason)
|
||||
diff --git a/include/bcrypt.h b/include/bcrypt.h
|
||||
index 866914c..a5abf23 100644
|
||||
--- a/include/bcrypt.h
|
||||
+++ b/include/bcrypt.h
|
||||
@@ -204,6 +204,20 @@ typedef struct _BCRYPT_KEY_DATA_BLOB_HEADER
|
||||
ULONG cbKeyData;
|
||||
} BCRYPT_KEY_DATA_BLOB_HEADER, *PBCRYPT_KEY_DATA_BLOB_HEADER;
|
||||
|
||||
+typedef struct _BCryptBuffer
|
||||
+{
|
||||
+ ULONG cbBuffer;
|
||||
+ ULONG BufferType;
|
||||
+ void *pvBuffer;
|
||||
+} BCryptBuffer, *PBCryptBuffer;
|
||||
+
|
||||
+typedef struct _BCryptBufferDesc
|
||||
+{
|
||||
+ ULONG ulVersion;
|
||||
+ ULONG cBuffers;
|
||||
+ PBCryptBuffer pBuffers;
|
||||
+} BCryptBufferDesc, *PBCryptBufferDesc;
|
||||
+
|
||||
#define BCRYPT_KEY_DATA_BLOB_MAGIC 0x4d42444b
|
||||
#define BCRYPT_KEY_DATA_BLOB_VERSION1 1
|
||||
|
||||
@@ -226,6 +240,7 @@ typedef PVOID BCRYPT_SECRET_HANDLE;
|
||||
NTSTATUS WINAPI BCryptCloseAlgorithmProvider(BCRYPT_ALG_HANDLE, ULONG);
|
||||
NTSTATUS WINAPI BCryptCreateHash(BCRYPT_ALG_HANDLE, BCRYPT_HASH_HANDLE *, PUCHAR, ULONG, PUCHAR, ULONG, ULONG);
|
||||
NTSTATUS WINAPI BCryptDecrypt(BCRYPT_KEY_HANDLE, PUCHAR, ULONG, VOID *, PUCHAR, ULONG, PUCHAR, ULONG, ULONG *, ULONG);
|
||||
+NTSTATUS WINAPI BCryptDeriveKey(BCRYPT_SECRET_HANDLE, LPCWSTR, BCryptBufferDesc*, PUCHAR, ULONG, ULONG *, ULONG);
|
||||
NTSTATUS WINAPI BCryptDeriveKeyPBKDF2(BCRYPT_ALG_HANDLE, PUCHAR, ULONG, PUCHAR, ULONG, ULONGLONG, PUCHAR, ULONG, ULONG);
|
||||
NTSTATUS WINAPI BCryptDestroyHash(BCRYPT_HASH_HANDLE);
|
||||
NTSTATUS WINAPI BCryptDestroyKey(BCRYPT_KEY_HANDLE);
|
||||
--
|
||||
1.9.1
|
||||
|
1
patches/bcrypt-BCryptSecretAgreement/definition
Normal file
1
patches/bcrypt-BCryptSecretAgreement/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [46564] Add BCryptDestroySecret/BCryptSecretAgreement stubs.
|
@@ -0,0 +1,35 @@
|
||||
From 37c7da9a71e327dfe86c0c550cabc50968abd04d Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Shadura <bugzilla@tut.by>
|
||||
Date: Fri, 1 Feb 2019 08:38:10 +1100
|
||||
Subject: [PATCH] comctl32: Fixed rebar behaviour when there's capture and no
|
||||
drag
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=14750
|
||||
---
|
||||
dlls/comctl32/rebar.c | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c
|
||||
index aaa1047..29fc854 100644
|
||||
--- a/dlls/comctl32/rebar.c
|
||||
+++ b/dlls/comctl32/rebar.c
|
||||
@@ -3119,7 +3119,15 @@ REBAR_MouseMove (REBAR_INFO *infoPtr, LPARAM lParam)
|
||||
int yPtMove = (infoPtr->dwStyle & CCS_VERT ? ptMove.x : ptMove.y);
|
||||
|
||||
if (GetCapture() != infoPtr->hwndSelf)
|
||||
- ERR("We are dragging but haven't got capture?!?\n");
|
||||
+ {
|
||||
+ if (infoPtr->fStatus & BEGIN_DRAG_ISSUED)
|
||||
+ {
|
||||
+ REBAR_Notify_NMREBAR (infoPtr, infoPtr->iGrabbedBand, RBN_ENDDRAG);
|
||||
+ infoPtr->fStatus &= ~BEGIN_DRAG_ISSUED;
|
||||
+ }
|
||||
+ infoPtr->iGrabbedBand = -1;
|
||||
+ return 0;
|
||||
+ }
|
||||
|
||||
band = REBAR_GetBand(infoPtr, infoPtr->iGrabbedBand);
|
||||
|
||||
--
|
||||
1.9.1
|
||||
|
1
patches/comctrl-rebar-capture/definition
Normal file
1
patches/comctrl-rebar-capture/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [14750] comctl32: Fixed rebar behaviour when there's capture and no drag.
|
@@ -1,7 +1,7 @@
|
||||
From 2af2d1c51ec73862a156850d702dcb4608d73558 Mon Sep 17 00:00:00 2001
|
||||
From 30d0aa2712dbdfe8f532118f9829c7999c0326a7 Mon Sep 17 00:00:00 2001
|
||||
From: Lucian Poston <lucian.poston@gmail.com>
|
||||
Date: Thu, 3 May 2018 00:38:06 -0700
|
||||
Subject: d2d1: Use ID2D1Factory1 in d2d_geometry
|
||||
Subject: [PATCH] d2d1: Use ID2D1Factory1 in d2d_geometry
|
||||
|
||||
https://bugs.winehq.org/show_bug.cgi?id=44052
|
||||
|
||||
@@ -13,10 +13,10 @@ Signed-off-by: Lucian Poston <lucian.poston@gmail.com>
|
||||
3 files changed, 28 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h
|
||||
index 21e2b88..0bb0112 100644
|
||||
index 70b841df8cb..85c56524de4 100644
|
||||
--- a/dlls/d2d1/d2d1_private.h
|
||||
+++ b/dlls/d2d1/d2d1_private.h
|
||||
@@ -406,7 +406,7 @@ struct d2d_geometry
|
||||
@@ -424,7 +424,7 @@ struct d2d_geometry
|
||||
ID2D1Geometry ID2D1Geometry_iface;
|
||||
LONG refcount;
|
||||
|
||||
@@ -25,7 +25,7 @@ index 21e2b88..0bb0112 100644
|
||||
|
||||
D2D_MATRIX_3X2_F transform;
|
||||
|
||||
@@ -470,10 +470,10 @@ struct d2d_geometry
|
||||
@@ -494,10 +494,10 @@ struct d2d_geometry
|
||||
} u;
|
||||
};
|
||||
|
||||
@@ -37,13 +37,13 @@ index 21e2b88..0bb0112 100644
|
||||
+ ID2D1Factory1 *factory, const D2D1_RECT_F *rect) DECLSPEC_HIDDEN;
|
||||
+void d2d_transformed_geometry_init(struct d2d_geometry *geometry, ID2D1Factory1 *factory,
|
||||
ID2D1Geometry *src_geometry, const D2D_MATRIX_3X2_F *transform) DECLSPEC_HIDDEN;
|
||||
struct d2d_geometry *unsafe_impl_from_ID2D1Geometry(ID2D1Geometry *iface) DECLSPEC_HIDDEN;
|
||||
|
||||
HRESULT d2d_geometry_group_init(struct d2d_geometry *geometry, ID2D1Factory *factory,
|
||||
D2D1_FILL_MODE fill_mode, ID2D1Geometry **src_geometries, unsigned int geometry_count) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/d2d1/factory.c b/dlls/d2d1/factory.c
|
||||
index 7810e95..2a1a536 100644
|
||||
index c2a0405abdd..33c2d173596 100644
|
||||
--- a/dlls/d2d1/factory.c
|
||||
+++ b/dlls/d2d1/factory.c
|
||||
@@ -140,7 +140,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateRectangleGeometry(ID2D1Factor
|
||||
@@ -141,7 +141,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateRectangleGeometry(ID2D1Factor
|
||||
if (!(object = heap_alloc_zero(sizeof(*object))))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
@@ -52,7 +52,7 @@ index 7810e95..2a1a536 100644
|
||||
{
|
||||
WARN("Failed to initialize rectangle geometry, hr %#x.\n", hr);
|
||||
heap_free(object);
|
||||
@@ -190,7 +190,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateTransformedGeometry(ID2D1Fact
|
||||
@@ -207,7 +207,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateTransformedGeometry(ID2D1Fact
|
||||
if (!(object = heap_alloc_zero(sizeof(*object))))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
@@ -61,7 +61,7 @@ index 7810e95..2a1a536 100644
|
||||
|
||||
TRACE("Created transformed geometry %p.\n", object);
|
||||
*transformed_geometry = (ID2D1TransformedGeometry *)&object->ID2D1Geometry_iface;
|
||||
@@ -207,7 +207,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreatePathGeometry(ID2D1Factory1 *i
|
||||
@@ -224,7 +224,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreatePathGeometry(ID2D1Factory2 *i
|
||||
if (!(object = heap_alloc_zero(sizeof(*object))))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
@@ -71,7 +71,7 @@ index 7810e95..2a1a536 100644
|
||||
TRACE("Created path geometry %p.\n", object);
|
||||
*geometry = (ID2D1PathGeometry *)&object->ID2D1Geometry_iface;
|
||||
diff --git a/dlls/d2d1/geometry.c b/dlls/d2d1/geometry.c
|
||||
index d716fb1..5bf63f6 100644
|
||||
index 250ff0c5535..7b67e247f7a 100644
|
||||
--- a/dlls/d2d1/geometry.c
|
||||
+++ b/dlls/d2d1/geometry.c
|
||||
@@ -2343,15 +2343,15 @@ static void d2d_geometry_cleanup(struct d2d_geometry *geometry)
|
||||
@@ -134,7 +134,7 @@ index d716fb1..5bf63f6 100644
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_rectangle_geometry_GetBounds(ID2D1RectangleGeometry *iface,
|
||||
@@ -3780,7 +3788,7 @@ static const struct ID2D1RectangleGeometryVtbl d2d_rectangle_geometry_vtbl =
|
||||
@@ -3779,7 +3787,7 @@ static const struct ID2D1RectangleGeometryVtbl d2d_rectangle_geometry_vtbl =
|
||||
d2d_rectangle_geometry_GetRect,
|
||||
};
|
||||
|
||||
@@ -143,7 +143,7 @@ index d716fb1..5bf63f6 100644
|
||||
{
|
||||
struct d2d_face *f;
|
||||
D2D1_POINT_2F *v;
|
||||
@@ -3901,10 +3909,14 @@ static void STDMETHODCALLTYPE d2d_transformed_geometry_GetFactory(ID2D1Transform
|
||||
@@ -3900,10 +3908,14 @@ static void STDMETHODCALLTYPE d2d_transformed_geometry_GetFactory(ID2D1Transform
|
||||
ID2D1Factory **factory)
|
||||
{
|
||||
struct d2d_geometry *geometry = impl_from_ID2D1TransformedGeometry(iface);
|
||||
@@ -159,7 +159,7 @@ index d716fb1..5bf63f6 100644
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_transformed_geometry_GetBounds(ID2D1TransformedGeometry *iface,
|
||||
@@ -4098,7 +4110,7 @@ static const struct ID2D1TransformedGeometryVtbl d2d_transformed_geometry_vtbl =
|
||||
@@ -4096,7 +4108,7 @@ static const struct ID2D1TransformedGeometryVtbl d2d_transformed_geometry_vtbl =
|
||||
d2d_transformed_geometry_GetTransform,
|
||||
};
|
||||
|
||||
@@ -169,5 +169,5 @@ index d716fb1..5bf63f6 100644
|
||||
{
|
||||
struct d2d_geometry *src_impl;
|
||||
--
|
||||
2.7.4
|
||||
2.20.1
|
||||
|
||||
|
@@ -1362,7 +1362,7 @@ index c930248..80f73de 100644
|
||||
+ object->device = iface;
|
||||
+ object->refcount = 1;
|
||||
+
|
||||
+ ID3D11Device_AddRef(iface);
|
||||
+ ID3D11Device2_AddRef(iface);
|
||||
+ wined3d_private_store_init(&object->private_store);
|
||||
+
|
||||
+ *context = &object->ID3D11DeviceContext_iface;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From b8d301b085b39fba7f61409a0ebe17a4ff7b810a Mon Sep 17 00:00:00 2001
|
||||
From 07c70b0b20919d9908b408322d65c62ad459f09e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 19 Jan 2017 16:56:56 +0100
|
||||
Subject: [PATCH] d3d11: Initial implementation for deferred contexts.
|
||||
@@ -8,7 +8,7 @@ Subject: [PATCH] d3d11: Initial implementation for deferred contexts.
|
||||
1 file changed, 1040 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 9127d01..94156e4 100644
|
||||
index ebe8c03..791b959 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -19,12 +19,181 @@
|
||||
@@ -725,7 +725,7 @@ index 9127d01..94156e4 100644
|
||||
static void STDMETHODCALLTYPE d3d_null_wined3d_object_destroyed(void *parent) {}
|
||||
|
||||
static const struct wined3d_parent_ops d3d_null_wined3d_parent_ops =
|
||||
@@ -1217,7 +1908,20 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ResolveSubresource(ID3D11D
|
||||
@@ -1221,7 +1912,20 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ResolveSubresource(ID3D11D
|
||||
static void STDMETHODCALLTYPE d3d11_immediate_context_ExecuteCommandList(ID3D11DeviceContext1 *iface,
|
||||
ID3D11CommandList *command_list, BOOL restore_state)
|
||||
{
|
||||
@@ -747,7 +747,7 @@ index 9127d01..94156e4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetShaderResources(ID3D11DeviceContext1 *iface,
|
||||
@@ -2972,6 +3676,7 @@ static ULONG STDMETHODCALLTYPE d3d11_deferred_context_Release(ID3D11DeviceContex
|
||||
@@ -2855,6 +3559,7 @@ static ULONG STDMETHODCALLTYPE d3d11_deferred_context_Release(ID3D11DeviceContex
|
||||
|
||||
if (!refcount)
|
||||
{
|
||||
@@ -755,7 +755,7 @@ index 9127d01..94156e4 100644
|
||||
wined3d_private_store_cleanup(&context->private_store);
|
||||
ID3D11Device_Release(context->device);
|
||||
HeapFree(GetProcessHeap(), 0, context);
|
||||
@@ -3023,43 +3728,86 @@ static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_SetPrivateDataInterface(
|
||||
@@ -2906,43 +3611,86 @@ static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_SetPrivateDataInterface(
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetConstantBuffers(ID3D11DeviceContext *iface,
|
||||
UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
|
||||
{
|
||||
@@ -848,7 +848,7 @@ index 9127d01..94156e4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_Draw(ID3D11DeviceContext *iface,
|
||||
@@ -3072,53 +3820,169 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_Draw(ID3D11DeviceContext *i
|
||||
@@ -2955,53 +3703,169 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_Draw(ID3D11DeviceContext *i
|
||||
static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_Map(ID3D11DeviceContext *iface, ID3D11Resource *resource,
|
||||
UINT subresource_idx, D3D11_MAP map_type, UINT map_flags, D3D11_MAPPED_SUBRESOURCE *mapped_subresource)
|
||||
{
|
||||
@@ -1027,7 +1027,7 @@ index 9127d01..94156e4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_DrawInstanced(ID3D11DeviceContext *iface,
|
||||
@@ -3147,7 +4011,16 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetShader(ID3D11DeviceCon
|
||||
@@ -3030,7 +3894,16 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetShader(ID3D11DeviceCon
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_IASetPrimitiveTopology(ID3D11DeviceContext *iface,
|
||||
D3D11_PRIMITIVE_TOPOLOGY topology)
|
||||
{
|
||||
@@ -1045,7 +1045,7 @@ index 9127d01..94156e4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetShaderResources(ID3D11DeviceContext *iface,
|
||||
@@ -3207,8 +4080,28 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargets(ID3D11De
|
||||
@@ -3090,8 +3963,28 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargets(ID3D11De
|
||||
UINT render_target_view_count, ID3D11RenderTargetView *const *render_target_views,
|
||||
ID3D11DepthStencilView *depth_stencil_view)
|
||||
{
|
||||
@@ -1075,7 +1075,7 @@ index 9127d01..94156e4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargetsAndUnorderedAccessViews(
|
||||
@@ -3228,15 +4121,44 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargetsAndUnorde
|
||||
@@ -3111,15 +4004,44 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargetsAndUnorde
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetBlendState(ID3D11DeviceContext *iface,
|
||||
ID3D11BlendState *blend_state, const float blend_factor[4], UINT sample_mask)
|
||||
{
|
||||
@@ -1122,7 +1122,7 @@ index 9127d01..94156e4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_SOSetTargets(ID3D11DeviceContext *iface, UINT buffer_count,
|
||||
@@ -3278,13 +4200,34 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DispatchIndirect(ID3D11Devi
|
||||
@@ -3161,13 +4083,34 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DispatchIndirect(ID3D11Devi
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_RSSetState(ID3D11DeviceContext *iface,
|
||||
ID3D11RasterizerState *rasterizer_state)
|
||||
{
|
||||
@@ -1159,7 +1159,7 @@ index 9127d01..94156e4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_RSSetScissorRects(ID3D11DeviceContext *iface,
|
||||
@@ -3399,8 +4342,18 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetShaderResources(ID3D11
|
||||
@@ -3282,8 +4225,18 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetShaderResources(ID3D11
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetShader(ID3D11DeviceContext *iface,
|
||||
ID3D11HullShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
|
||||
{
|
||||
@@ -1179,7 +1179,7 @@ index 9127d01..94156e4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetSamplers(ID3D11DeviceContext *iface,
|
||||
@@ -3413,36 +4366,62 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetSamplers(ID3D11DeviceC
|
||||
@@ -3296,36 +4249,62 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetSamplers(ID3D11DeviceC
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetConstantBuffers(ID3D11DeviceContext *iface,
|
||||
UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
|
||||
{
|
||||
@@ -1247,7 +1247,7 @@ index 9127d01..94156e4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetShaderResources(ID3D11DeviceContext *iface,
|
||||
@@ -3743,7 +4722,15 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CSGetConstantBuffers(ID3D11
|
||||
@@ -3626,7 +4605,15 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CSGetConstantBuffers(ID3D11
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_ClearState(ID3D11DeviceContext *iface)
|
||||
{
|
||||
@@ -1264,7 +1264,7 @@ index 9127d01..94156e4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_Flush(ID3D11DeviceContext *iface)
|
||||
@@ -3768,9 +4755,29 @@ static UINT STDMETHODCALLTYPE d3d11_deferred_context_GetContextFlags(ID3D11Devic
|
||||
@@ -3651,9 +4638,29 @@ static UINT STDMETHODCALLTYPE d3d11_deferred_context_GetContextFlags(ID3D11Devic
|
||||
static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_FinishCommandList(ID3D11DeviceContext *iface,
|
||||
BOOL restore, ID3D11CommandList **command_list)
|
||||
{
|
||||
@@ -1296,13 +1296,13 @@ index 9127d01..94156e4 100644
|
||||
}
|
||||
|
||||
static const struct ID3D11DeviceContextVtbl d3d11_deferred_context_vtbl =
|
||||
@@ -4385,6 +5392,8 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext(ID3D11Device
|
||||
@@ -4268,6 +5275,8 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext(ID3D11Device
|
||||
object->device = iface;
|
||||
object->refcount = 1;
|
||||
|
||||
+ list_init(&object->commands);
|
||||
+
|
||||
ID3D11Device_AddRef(iface);
|
||||
ID3D11Device2_AddRef(iface);
|
||||
wined3d_private_store_init(&object->private_store);
|
||||
|
||||
--
|
||||
|
@@ -1,156 +0,0 @@
|
||||
From 3dc821fe683d1e17976ca9367465c1412e1140b4 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 14 Jan 2017 07:50:36 +0100
|
||||
Subject: d3d8: Improve ValidateVertexShader stub.
|
||||
|
||||
---
|
||||
dlls/d3d8/d3d8_main.c | 43 ++++++++++++++++++++++---------------------
|
||||
dlls/d3d8/tests/device.c | 40 +++++++++++++++++++++++++---------------
|
||||
2 files changed, 47 insertions(+), 36 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d8/d3d8_main.c b/dlls/d3d8/d3d8_main.c
|
||||
index 8ac704c364c..2ab0414b7f2 100644
|
||||
--- a/dlls/d3d8/d3d8_main.c
|
||||
+++ b/dlls/d3d8/d3d8_main.c
|
||||
@@ -58,38 +58,39 @@ IDirect3D8 * WINAPI DECLSPEC_HOTPATCH Direct3DCreate8(UINT sdk_version)
|
||||
|
||||
/***********************************************************************
|
||||
* ValidateVertexShader (D3D8.@)
|
||||
- *
|
||||
- * I've seen reserved1 and reserved2 always passed as 0's
|
||||
- * bool seems always passed as 0 or 1, but other values work as well...
|
||||
- * toto result?
|
||||
*/
|
||||
-HRESULT WINAPI ValidateVertexShader(DWORD* vertexshader, DWORD* reserved1, DWORD* reserved2, BOOL bool, DWORD* toto)
|
||||
+HRESULT WINAPI ValidateVertexShader(DWORD *vertexshader, DWORD *reserved1, DWORD *reserved2,
|
||||
+ BOOL return_error, char **errors)
|
||||
{
|
||||
- HRESULT ret;
|
||||
- static BOOL warned;
|
||||
-
|
||||
- if (TRACE_ON(d3d8) || !warned) {
|
||||
- FIXME("(%p %p %p %d %p): stub\n", vertexshader, reserved1, reserved2, bool, toto);
|
||||
- warned = TRUE;
|
||||
- }
|
||||
+ const char *message = "";
|
||||
+ HRESULT hr = E_FAIL;
|
||||
|
||||
- if (!vertexshader)
|
||||
- return E_FAIL;
|
||||
+ TRACE("(%p %p %p %d %p): semi-stub\n", vertexshader, reserved1, reserved2, return_error, errors);
|
||||
|
||||
- if (reserved1 || reserved2)
|
||||
- return E_FAIL;
|
||||
+ if (!vertexshader)
|
||||
+ {
|
||||
+ message = "(Global Validation Error) Version Token: Code pointer cannot be NULL.\n";
|
||||
+ goto done;
|
||||
+ }
|
||||
|
||||
- switch(*vertexshader) {
|
||||
+ switch (*vertexshader)
|
||||
+ {
|
||||
case 0xFFFE0101:
|
||||
case 0xFFFE0100:
|
||||
- ret=S_OK;
|
||||
+ hr = S_OK;
|
||||
break;
|
||||
+
|
||||
default:
|
||||
WARN("Invalid shader version token %#x.\n", *vertexshader);
|
||||
- ret=E_FAIL;
|
||||
- }
|
||||
+ message = "(Global Validation Error) Version Token: Unsupported vertex shader version.\n";
|
||||
+ }
|
||||
|
||||
- return ret;
|
||||
+done:
|
||||
+ if (!return_error) message = "";
|
||||
+ if (errors && (*errors = HeapAlloc(GetProcessHeap(), 0, strlen(message) + 1)))
|
||||
+ strcpy(*errors, message);
|
||||
+
|
||||
+ return hr;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c
|
||||
index 28c6af32e0c..1368ce3a2cf 100644
|
||||
--- a/dlls/d3d8/tests/device.c
|
||||
+++ b/dlls/d3d8/tests/device.c
|
||||
@@ -50,7 +50,7 @@ struct device_desc
|
||||
|
||||
static DEVMODEW registry_mode;
|
||||
|
||||
-static HRESULT (WINAPI *ValidateVertexShader)(DWORD *, DWORD *, DWORD *, int, DWORD *);
|
||||
+static HRESULT (WINAPI *ValidateVertexShader)(DWORD *, DWORD *, DWORD *, BOOL, char **);
|
||||
static HRESULT (WINAPI *ValidatePixelShader)(DWORD *, DWORD *, int, DWORD *);
|
||||
|
||||
static BOOL (WINAPI *pGetCursorInfo)(PCURSORINFO);
|
||||
@@ -4238,18 +4238,31 @@ static void test_validate_vs(void)
|
||||
0x00000009, 0xc0080000, 0x90e40000, 0xa0e40003, /* dp4 oPos.w, v0, c3 */
|
||||
0x0000ffff, /* end */
|
||||
};
|
||||
+ char *errors;
|
||||
HRESULT hr;
|
||||
|
||||
hr = ValidateVertexShader(0, 0, 0, 0, 0);
|
||||
ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
|
||||
hr = ValidateVertexShader(0, 0, 0, 1, 0);
|
||||
ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
|
||||
+
|
||||
+ errors = (void *)0xdeadbeef;
|
||||
+ hr = ValidateVertexShader(0, 0, 0, 0, &errors);
|
||||
+ ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
|
||||
+ ok(!strcmp(errors, ""), "Got unexpected string '%s'.\n", errors);
|
||||
+ HeapFree(GetProcessHeap(), 0, errors);
|
||||
+
|
||||
+ errors = (void *)0xdeadbeef;
|
||||
+ hr = ValidateVertexShader(0, 0, 0, 1, &errors);
|
||||
+ ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
|
||||
+ ok(strstr(errors, "Validation Error") != NULL, "Got unexpected string '%s'.\n", errors);
|
||||
+ HeapFree(GetProcessHeap(), 0, errors);
|
||||
+
|
||||
hr = ValidateVertexShader(vs, 0, 0, 0, 0);
|
||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
-
|
||||
hr = ValidateVertexShader(vs, 0, 0, 1, 0);
|
||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
- /* Seems to do some version checking. */
|
||||
+
|
||||
*vs = 0xfffe0100; /* vs_1_0 */
|
||||
hr = ValidateVertexShader(vs, 0, 0, 0, 0);
|
||||
ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
@@ -4257,21 +4270,18 @@ static void test_validate_vs(void)
|
||||
*vs = 0xfffe0102; /* bogus version */
|
||||
hr = ValidateVertexShader(vs, 0, 0, 1, 0);
|
||||
ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
|
||||
- /* I've seen that applications always pass the 2nd and 3rd parameter as 0.
|
||||
- * Simple test with non-zero parameters. */
|
||||
- *vs = 0xfffe0101; /* vs_1_1 */
|
||||
- hr = ValidateVertexShader(vs, vs, 0, 1, 0);
|
||||
+
|
||||
+ errors = (void *)0xdeadbeef;
|
||||
+ hr = ValidateVertexShader(vs, 0, 0, 0, &errors);
|
||||
ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
|
||||
+ ok(!strcmp(errors, ""), "Got unexpected string '%s'.\n", errors);
|
||||
+ HeapFree(GetProcessHeap(), 0, errors);
|
||||
|
||||
- hr = ValidateVertexShader(vs, 0, vs, 1, 0);
|
||||
+ errors = (void *)0xdeadbeef;
|
||||
+ hr = ValidateVertexShader(vs, 0, 0, 1, &errors);
|
||||
ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
|
||||
- /* I've seen the 4th parameter always passed as either 0 or 1, but passing
|
||||
- * other values doesn't seem to hurt. */
|
||||
- hr = ValidateVertexShader(vs, 0, 0, 12345, 0);
|
||||
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
- /* What is the 5th parameter? The following seems to work ok. */
|
||||
- hr = ValidateVertexShader(vs, 0, 0, 1, vs);
|
||||
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ ok(strstr(errors, "Validation Error") != NULL, "Got unexpected string '%s'.\n", errors);
|
||||
+ HeapFree(GetProcessHeap(), 0, errors);
|
||||
}
|
||||
|
||||
static void test_validate_ps(void)
|
||||
--
|
||||
2.11.0
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user