Nikolay Sivov : rsaenh: Fail on unsupported flag values only in CryptHashData().

Alexandre Julliard julliard at winehq.org
Fri Jan 10 14:44:55 CST 2014


Module: wine
Branch: stable
Commit: fa4cd5b4ee44db881cdd7f4614c4b3a6e42b53f5
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=fa4cd5b4ee44db881cdd7f4614c4b3a6e42b53f5

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Thu Oct 17 22:36:36 2013 +0400

rsaenh: Fail on unsupported flag values only in CryptHashData().

(cherry picked from commit bfd2c533beef454a61b24f92790f91099e607365)

---

 dlls/rsaenh/rsaenh.c |    2 +-
 include/wincrypt.h   |    2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/dlls/rsaenh/rsaenh.c b/dlls/rsaenh/rsaenh.c
index b4e4b35..210ef19 100644
--- a/dlls/rsaenh/rsaenh.c
+++ b/dlls/rsaenh/rsaenh.c
@@ -4084,7 +4084,7 @@ BOOL WINAPI RSAENH_CPHashData(HCRYPTPROV hProv, HCRYPTHASH hHash, CONST BYTE *pb
     TRACE("(hProv=%08lx, hHash=%08lx, pbData=%p, dwDataLen=%d, dwFlags=%08x)\n",
           hProv, hHash, pbData, dwDataLen, dwFlags);
 
-    if (dwFlags)
+    if (dwFlags & ~CRYPT_USERDATA)
     {
         SetLastError(NTE_BAD_FLAGS);
         return FALSE;
diff --git a/include/wincrypt.h b/include/wincrypt.h
index 617a9b9..d3d9f66 100644
--- a/include/wincrypt.h
+++ b/include/wincrypt.h
@@ -3890,6 +3890,8 @@ typedef BOOL (WINAPI *PFN_CMSG_IMPORT_KEY_TRANS)(
 #define EXPORT_PRIVATE_KEYS                   0x00000004
 #define PKCS12_EXPORT_RESERVED_MASK           0xffff0000
 
+#define CRYPT_USERDATA    0x00000001
+
 /* function declarations */
 /* advapi32.dll */
 WINADVAPI BOOL WINAPI CryptAcquireContextA(HCRYPTPROV *, LPCSTR, LPCSTR, DWORD, DWORD);




More information about the wine-cvs mailing list