Juan Lang : crypt32: Support setting the salt value through KP_SALT_EX.
Alexandre Julliard
julliard at winehq.org
Thu Nov 29 10:31:21 CST 2007
Module: wine
Branch: master
Commit: 83f74fef2c0531b2b24eb200856ff14fadd4a1ac
URL: http://source.winehq.org/git/wine.git/?a=commit;h=83f74fef2c0531b2b24eb200856ff14fadd4a1ac
Author: Juan Lang <juan.lang at gmail.com>
Date: Wed Nov 28 09:27:36 2007 -0800
crypt32: Support setting the salt value through KP_SALT_EX.
---
dlls/rsaenh/rsaenh.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/dlls/rsaenh/rsaenh.c b/dlls/rsaenh/rsaenh.c
index 48c2c0f..29e072c 100644
--- a/dlls/rsaenh/rsaenh.c
+++ b/dlls/rsaenh/rsaenh.c
@@ -2823,6 +2823,23 @@ BOOL WINAPI RSAENH_CPSetKeyParam(HCRYPTPROV hProv, HCRYPTKEY hKey, DWORD dwParam
setup_key(pCryptKey);
return TRUE;
+ case KP_SALT_EX:
+ {
+ CRYPT_INTEGER_BLOB *blob = (CRYPT_INTEGER_BLOB *)pbData;
+
+ /* salt length can't be greater than 128 bits = 16 bytes */
+ if (blob->cbData > 16)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+ memcpy(pCryptKey->abKeyValue + pCryptKey->dwKeyLen, blob->pbData,
+ blob->cbData);
+ pCryptKey->dwSaltLen = blob->cbData;
+ setup_key(pCryptKey);
+ return TRUE;
+ }
+
case KP_EFFECTIVE_KEYLEN:
switch (pCryptKey->aiAlgid) {
case CALG_RC2:
More information about the wine-cvs
mailing list