rsaenh: Restore key state even after decrypting a block of bad data.
This commit is contained in:
parent
b84e11ecbd
commit
2d0653e2b2
|
@ -2380,11 +2380,13 @@ BOOL WINAPI RSAENH_CPDecrypt(HCRYPTPROV hProv, HCRYPTKEY hKey, HCRYPTHASH hHash,
|
|||
*pdwDataLen -= pbData[*pdwDataLen-1];
|
||||
else {
|
||||
SetLastError(NTE_BAD_DATA);
|
||||
setup_key(pCryptKey);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
else {
|
||||
SetLastError(NTE_BAD_DATA);
|
||||
setup_key(pCryptKey);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -840,7 +840,6 @@ static void test_3des112(void)
|
|||
result = CryptDecrypt(hKey, 0, TRUE, 0, pbData, &dwLen);
|
||||
ok(result, "%08x\n", GetLastError());
|
||||
ok(dwLen==cTestData[i].enclen,"length incorrect, got %d, expected %d\n",dwLen,cTestData[i].enclen);
|
||||
todo_wine
|
||||
ok(memcmp(pbData,cTestData[i].decstr,cTestData[1].enclen)==0,"decryption incorrect %d\n",i);
|
||||
if((dwLen != cTestData[i].enclen) ||
|
||||
memcmp(pbData,cTestData[i].decstr,cTestData[i].enclen))
|
||||
|
@ -1019,7 +1018,6 @@ static void test_3des(void)
|
|||
result = CryptDecrypt(hKey, 0, TRUE, 0, pbData, &dwLen);
|
||||
ok(result, "%08x\n", GetLastError());
|
||||
ok(dwLen==cTestData[i].enclen,"length incorrect, got %d, expected %d\n",dwLen,cTestData[i].enclen);
|
||||
todo_wine
|
||||
ok(memcmp(pbData,cTestData[i].decstr,cTestData[1].enclen)==0,"decryption incorrect %d\n",i);
|
||||
if((dwLen != cTestData[i].enclen) ||
|
||||
memcmp(pbData,cTestData[i].decstr,cTestData[i].enclen))
|
||||
|
|
Loading…
Reference in New Issue