rsaenh: Fix the case when CPGetHashParam should return the size of the HASHVAL.

This commit is contained in:
Karsten Elfenbein 2006-07-25 20:59:12 +02:00 committed by Alexandre Julliard
parent bf1ad6c324
commit dd6598b834
1 changed files with 6 additions and 1 deletions

View File

@ -2567,7 +2567,12 @@ BOOL WINAPI RSAENH_CPGetHashParam(HCRYPTPROV hProv, HCRYPTHASH hHash, DWORD dwPa
return tls1_prf(hProv, pCryptHash->hKey, &pCryptHash->tpPRFParams.blobLabel, return tls1_prf(hProv, pCryptHash->hKey, &pCryptHash->tpPRFParams.blobLabel,
&pCryptHash->tpPRFParams.blobSeed, pbData, *pdwDataLen); &pCryptHash->tpPRFParams.blobSeed, pbData, *pdwDataLen);
} }
if ( pbData == NULL ) {
*pdwDataLen = pCryptHash->dwHashSize;
return TRUE;
}
if (pCryptHash->dwState == RSAENH_HASHSTATE_IDLE) { if (pCryptHash->dwState == RSAENH_HASHSTATE_IDLE) {
SetLastError(NTE_BAD_HASH_STATE); SetLastError(NTE_BAD_HASH_STATE);
return FALSE; return FALSE;