[PATCH] bcrypt: Add stub for BCryptOpenAlgorithmProvider.

Alex Henrie alexhenrie24 at gmail.com
Tue Apr 29 16:31:19 CDT 2014


Fixes the Opera crash noted in bug 20374.
---
 dlls/bcrypt/bcrypt.spec   |  2 +-
 dlls/bcrypt/bcrypt_main.c | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec
index 87623f8..6239b42 100644
--- a/dlls/bcrypt/bcrypt.spec
+++ b/dlls/bcrypt/bcrypt.spec
@@ -32,7 +32,7 @@
 @ stub BCryptHashData
 @ stub BCryptImportKey
 @ stub BCryptImportKeyPair
-@ stub BCryptOpenAlgorithmProvider
+@ stdcall BCryptOpenAlgorithmProvider(ptr ptr ptr long)
 @ stub BCryptQueryContextConfiguration
 @ stub BCryptQueryContextFunctionConfiguration
 @ stub BCryptQueryContextFunctionProperty
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 22da0dd..278cebf 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -91,3 +91,13 @@ NTSTATUS WINAPI BCryptGenRandom(BCRYPT_ALG_HANDLE algorithm, UCHAR *buffer, ULON
     FIXME("called with unsupported parameters, returning error\n");
     return STATUS_NOT_IMPLEMENTED;
 }
+
+NTSTATUS WINAPI BCryptOpenAlgorithmProvider(BCRYPT_ALG_HANDLE *phAlgorithm, LPCWSTR pszAlgId,
+                                            LPCWSTR pszImplementation, DWORD dwFlags)
+{
+    FIXME("%p, %s, %s, %08x - stub\n", phAlgorithm, wine_dbgstr_w(pszAlgId), wine_dbgstr_w(pszImplementation), dwFlags);
+
+    *phAlgorithm = NULL;
+
+    return STATUS_NOT_IMPLEMENTED;
+}
-- 
1.9.1



More information about the wine-patches mailing list