Module: wine Branch: master Commit: 52aca431e4acb099ae66d5689616793b11314ef9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=52aca431e4acb099ae66d56896...
Author: Bruno Jesus 00cpxxx@gmail.com Date: Mon Feb 3 16:24:21 2014 -0200
bcrypt: Add BCryptGenRandom stub.
---
dlls/bcrypt/bcrypt.spec | 2 +- dlls/bcrypt/bcrypt_main.c | 17 ++++++++++++++--- include/bcrypt.h | 5 +++++ 3 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec index e1ffb8a..87623f8 100644 --- a/dlls/bcrypt/bcrypt.spec +++ b/dlls/bcrypt/bcrypt.spec @@ -24,7 +24,7 @@ @ stub BCryptFinalizeKeyPair @ stub BCryptFinishHash @ stub BCryptFreeBuffer -@ stub BCryptGenRandom +@ stdcall BCryptGenRandom(ptr ptr long long) @ stub BCryptGenerateKeyPair @ stub BCryptGenerateSymmetricKey @ stub BCryptGetFipsAlgorithmMode diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c index 441b3ef..02d0a7d 100644 --- a/dlls/bcrypt/bcrypt_main.c +++ b/dlls/bcrypt/bcrypt_main.c @@ -18,11 +18,15 @@ */
#include "config.h" -#include "wine/port.h" -#include "wine/debug.h"
+#include <stdarg.h> + +#include "ntstatus.h" +#define WIN32_NO_STATUS +#include "windef.h" #include "winbase.h" #include "bcrypt.h" +#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(bcrypt);
@@ -48,5 +52,12 @@ NTSTATUS WINAPI BCryptEnumAlgorithms(ULONG dwAlgOperations, ULONG *pAlgCount, *ppAlgList=NULL; *pAlgCount=0;
- return ERROR_CALL_NOT_IMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS WINAPI BCryptGenRandom(BCRYPT_ALG_HANDLE algorithm, UCHAR *buffer, ULONG count, ULONG flags) +{ + FIXME("%p, %p, %u, %08x - stub\n", algorithm, buffer, count, flags); + + return STATUS_NOT_IMPLEMENTED; } diff --git a/include/bcrypt.h b/include/bcrypt.h index 43d1f94..e7e7a59 100644 --- a/include/bcrypt.h +++ b/include/bcrypt.h @@ -47,4 +47,9 @@ typedef struct _BCRYPT_ALGORITHM_IDENTIFIER ULONG dwFlags; } BCRYPT_ALGORITHM_IDENTIFIER;
+typedef PVOID BCRYPT_ALG_HANDLE; + +#define BCRYPT_RNG_USE_ENTROPY_IN_BUFFER 0x00000001 +#define BCRYPT_USE_SYSTEM_PREFERRED_RNG 0x00000002 + #endif /* __WINE_BCRYPT_H */