mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
92 lines
3.9 KiB
Diff
92 lines
3.9 KiB
Diff
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
|
|
|