Juan Lang : rsaenh: Merge the encrypting and decrypting states, as encrypting and decrypting are allowed with the same key.
Alexandre Julliard
julliard at winehq.org
Fri Feb 8 06:19:58 CST 2008
Module: wine
Branch: master
Commit: ad6a7a788de7ce09e98ea149fc7e7c51c5106fbf
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ad6a7a788de7ce09e98ea149fc7e7c51c5106fbf
Author: Juan Lang <juan.lang at gmail.com>
Date: Thu Feb 7 13:27:40 2008 -0800
rsaenh: Merge the encrypting and decrypting states, as encrypting and decrypting are allowed with the same key.
---
dlls/rsaenh/rsaenh.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/dlls/rsaenh/rsaenh.c b/dlls/rsaenh/rsaenh.c
index 1f0e0b2..ded6df7 100644
--- a/dlls/rsaenh/rsaenh.c
+++ b/dlls/rsaenh/rsaenh.c
@@ -75,8 +75,7 @@ typedef struct tagCRYPTHASH
#define RSAENH_MAX_BLOCK_SIZE 24
#define RSAENH_KEYSTATE_IDLE 0
#define RSAENH_KEYSTATE_ENCRYPTING 1
-#define RSAENH_KEYSTATE_DECRYPTING 2
-#define RSAENH_KEYSTATE_MASTERKEY 3
+#define RSAENH_KEYSTATE_MASTERKEY 2
typedef struct _RSAENH_SCHANNEL_INFO
{
SCHANNEL_ALG saEncAlg;
@@ -2115,9 +2114,9 @@ BOOL WINAPI RSAENH_CPDecrypt(HCRYPTPROV hProv, HCRYPTKEY hKey, HCRYPTHASH hHash,
}
if (pCryptKey->dwState == RSAENH_KEYSTATE_IDLE)
- pCryptKey->dwState = RSAENH_KEYSTATE_DECRYPTING;
+ pCryptKey->dwState = RSAENH_KEYSTATE_ENCRYPTING;
- if (pCryptKey->dwState != RSAENH_KEYSTATE_DECRYPTING)
+ if (pCryptKey->dwState != RSAENH_KEYSTATE_ENCRYPTING)
{
SetLastError(NTE_BAD_DATA);
return FALSE;
More information about the wine-cvs
mailing list