From dd6598b834d6e9f113f3c58dd84e778ae5583d4b Mon Sep 17 00:00:00 2001 From: Karsten Elfenbein Date: Tue, 25 Jul 2006 20:59:12 +0200 Subject: [PATCH] rsaenh: Fix the case when CPGetHashParam should return the size of the HASHVAL. --- dlls/rsaenh/rsaenh.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/rsaenh/rsaenh.c b/dlls/rsaenh/rsaenh.c index 7c9dcfba41c..d42face6e1d 100644 --- a/dlls/rsaenh/rsaenh.c +++ b/dlls/rsaenh/rsaenh.c @@ -2567,7 +2567,12 @@ BOOL WINAPI RSAENH_CPGetHashParam(HCRYPTPROV hProv, HCRYPTHASH hHash, DWORD dwPa return tls1_prf(hProv, pCryptHash->hKey, &pCryptHash->tpPRFParams.blobLabel, &pCryptHash->tpPRFParams.blobSeed, pbData, *pdwDataLen); } - + + if ( pbData == NULL ) { + *pdwDataLen = pCryptHash->dwHashSize; + return TRUE; + } + if (pCryptHash->dwState == RSAENH_HASHSTATE_IDLE) { SetLastError(NTE_BAD_HASH_STATE); return FALSE;