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