Commit 83f74fef authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: Support setting the salt value through KP_SALT_EX.

parent c9e0fa44
...@@ -2823,6 +2823,23 @@ BOOL WINAPI RSAENH_CPSetKeyParam(HCRYPTPROV hProv, HCRYPTKEY hKey, DWORD dwParam ...@@ -2823,6 +2823,23 @@ BOOL WINAPI RSAENH_CPSetKeyParam(HCRYPTPROV hProv, HCRYPTKEY hKey, DWORD dwParam
setup_key(pCryptKey); setup_key(pCryptKey);
return TRUE; 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: case KP_EFFECTIVE_KEYLEN:
switch (pCryptKey->aiAlgid) { switch (pCryptKey->aiAlgid) {
case CALG_RC2: case CALG_RC2:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment