Commit 3b26f513 authored by Michael Jung's avatar Michael Jung Committed by Alexandre Julliard

Check pdwDataLen param for non NULL'ness.

Implemented PP_IMPLTYPE and PP_VERSION provider params.
parent 4fd4bf90
......@@ -2762,6 +2762,11 @@ BOOL WINAPI RSAENH_CPGetProvParam(HCRYPTPROV hProv, DWORD dwParam, BYTE *pbData,
TRACE("(hProv=%08lx, dwParam=%08lx, pbData=%p, pdwDataLen=%p, dwFlags=%08lx)\n",
hProv, dwParam, pbData, pdwDataLen, dwFlags);
if (!pdwDataLen) {
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
if (!lookup_handle(&handle_table, (unsigned int)hProv, RSAENH_MAGIC_CONTAINER,
(OBJECTHDR**)&pKeyContainer))
{
......@@ -2784,7 +2789,15 @@ BOOL WINAPI RSAENH_CPGetProvParam(HCRYPTPROV hProv, DWORD dwParam, BYTE *pbData,
case PP_KEYX_KEYSIZE_INC:
dwTemp = 8;
return copy_param(pbData, pdwDataLen, (CONST BYTE*)&dwTemp, sizeof(dwTemp));
case PP_IMPTYPE:
dwTemp = CRYPT_IMPL_SOFTWARE;
return copy_param(pbData, pdwDataLen, (CONST BYTE*)&dwTemp, sizeof(dwTemp));
case PP_VERSION:
dwTemp = 0x00000200;
return copy_param(pbData, pdwDataLen, (CONST BYTE*)&dwTemp, sizeof(dwTemp));
case PP_ENUMCONTAINERS:
if ((dwFlags & CRYPT_FIRST) == CRYPT_FIRST) pKeyContainer->dwEnumContainersCtr = 0;
......
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