2018-07-18 15:45:46 -07:00
|
|
|
From 8ebad635c033bf41392e23ee50494195fdce73b9 Mon Sep 17 00:00:00 2001
|
2018-06-11 15:24:02 -07:00
|
|
|
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 ++++++
|
|
|
|
include/bcrypt.h | 1 +
|
|
|
|
3 files changed, 8 insertions(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec
|
2018-07-18 15:45:46 -07:00
|
|
|
index f4d9a57..1e81ad1 100644
|
2018-06-11 15:24:02 -07:00
|
|
|
--- a/dlls/bcrypt/bcrypt.spec
|
|
|
|
+++ b/dlls/bcrypt/bcrypt.spec
|
2018-07-18 15:45:46 -07:00
|
|
|
@@ -26,7 +26,7 @@
|
2018-06-11 15:24:02 -07:00
|
|
|
@ 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
|
2018-07-18 15:45:46 -07:00
|
|
|
index 003e8f3..0d94634 100644
|
2018-06-11 15:24:02 -07:00
|
|
|
--- a/dlls/bcrypt/bcrypt_main.c
|
|
|
|
+++ b/dlls/bcrypt/bcrypt_main.c
|
2018-07-18 15:45:46 -07:00
|
|
|
@@ -160,6 +160,12 @@ NTSTATUS WINAPI BCryptGenRandom(BCRYPT_ALG_HANDLE handle, UCHAR *buffer, ULONG c
|
|
|
|
return STATUS_NOT_IMPLEMENTED;
|
|
|
|
}
|
2018-06-11 15:24:02 -07:00
|
|
|
|
|
|
|
+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;
|
|
|
|
+}
|
|
|
|
+
|
2018-07-18 15:45:46 -07:00
|
|
|
NTSTATUS WINAPI BCryptOpenAlgorithmProvider( BCRYPT_ALG_HANDLE *handle, LPCWSTR id, LPCWSTR implementation, DWORD flags )
|
2018-06-11 15:24:02 -07:00
|
|
|
{
|
2018-07-18 15:45:46 -07:00
|
|
|
const DWORD supported_flags = BCRYPT_ALG_HANDLE_HMAC_FLAG;
|
2018-06-11 15:24:02 -07:00
|
|
|
diff --git a/include/bcrypt.h b/include/bcrypt.h
|
2018-07-18 15:45:46 -07:00
|
|
|
index 676db72..ce11685 100644
|
2018-06-11 15:24:02 -07:00
|
|
|
--- a/include/bcrypt.h
|
|
|
|
+++ b/include/bcrypt.h
|
2018-07-18 15:45:46 -07:00
|
|
|
@@ -224,6 +224,7 @@ NTSTATUS WINAPI BCryptDestroyKey(BCRYPT_KEY_HANDLE);
|
2018-06-11 15:24:02 -07:00
|
|
|
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 *);
|
|
|
|
--
|
2018-07-18 15:45:46 -07:00
|
|
|
1.9.1
|
2018-06-11 15:24:02 -07:00
|
|
|
|