Hans Leidekker : dssenh: Implement CPGenRandom.
Alexandre Julliard
julliard at winehq.org
Mon Oct 12 15:20:51 CDT 2020
Module: wine
Branch: master
Commit: c822cb995e0b362460c09d1d1297aef93840ba83
URL: https://source.winehq.org/git/wine.git/?a=commit;h=c822cb995e0b362460c09d1d1297aef93840ba83
Author: Hans Leidekker <hans at codeweavers.com>
Date: Mon Oct 12 16:11:11 2020 +0200
dssenh: Implement CPGenRandom.
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/dssenh/dssenh.spec | 2 +-
dlls/dssenh/main.c | 12 ++++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/dlls/dssenh/dssenh.spec b/dlls/dssenh/dssenh.spec
index e74650c9bb..eb9ef06337 100644
--- a/dlls/dssenh/dssenh.spec
+++ b/dlls/dssenh/dssenh.spec
@@ -9,7 +9,7 @@
@ stub CPEncrypt
@ stdcall CPExportKey(ptr ptr ptr long long ptr ptr)
@ stdcall CPGenKey(ptr long long ptr)
-@ stub CPGenRandom
+@ stdcall CPGenRandom(ptr long ptr)
@ stdcall CPGetHashParam(ptr ptr long ptr ptr long)
@ stub CPGetKeyParam
@ stdcall CPGetProvParam(ptr long ptr ptr long)
diff --git a/dlls/dssenh/main.c b/dlls/dssenh/main.c
index 38ee325b8e..ce7b15f7a6 100644
--- a/dlls/dssenh/main.c
+++ b/dlls/dssenh/main.c
@@ -27,6 +27,7 @@
#include "bcrypt.h"
#include "objbase.h"
#include "rpcproxy.h"
+#include "ntsecapi.h"
#include "wine/debug.h"
#include "wine/heap.h"
@@ -498,6 +499,17 @@ BOOL WINAPI CPDuplicateKey( HCRYPTPROV hprov, HCRYPTKEY hkey, DWORD *reserved, D
return TRUE;
}
+BOOL WINAPI CPGenRandom( HCRYPTPROV hprov, DWORD len, BYTE *buffer )
+{
+ struct container *container = (struct container *)hprov;
+
+ TRACE( "%p, %u, %p\n", (void *)hprov, len, buffer );
+
+ if (container->magic != MAGIC_CONTAINER) return FALSE;
+
+ return RtlGenRandom( buffer, len );
+}
+
static struct hash *create_hash( ALG_ID algid )
{
struct hash *ret;
More information about the wine-cvs
mailing list