Updated bcrypt-BCryptDeriveKeyPBKDF2 patchset

This commit is contained in:
Alistair Leslie-Hughes 2018-11-22 10:46:38 +11:00
parent c90f89fe90
commit ad768e05ba

View File

@ -1,4 +1,4 @@
From a324685a2f4f48d5d9da8c3000164800152dc297 Mon Sep 17 00:00:00 2001
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.
@ -17,8 +17,9 @@ 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 +
4 files changed, 248 insertions(+)
5 files changed, 249 insertions(+), 1 deletion(-)
diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec
index 78824d7..f4d9a57 100644
@ -33,10 +34,10 @@ index 78824d7..f4d9a57 100644
@ stdcall BCryptDestroyKey(ptr)
@ stub BCryptDestroySecret
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 29a0a78..33c1da53 100644
index 2b9ae0b..49ccb13 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -2315,6 +2315,169 @@ NTSTATUS WINAPI BCryptSetProperty( BCRYPT_HANDLE handle, const WCHAR *prop, UCHA
@@ -1316,6 +1316,169 @@ NTSTATUS WINAPI BCryptSetProperty( BCRYPT_HANDLE handle, const WCHAR *prop, UCHA
}
}
@ -320,6 +321,19 @@ index 6865e87..5c4df6a 100644
+
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