crypt32: Look for the provider that supports the specified content OID in CryptMsgOpenToEncode(CMSG_HASHED).

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2018-11-06 13:41:05 +03:00 committed by Alexandre Julliard
parent fd6e9ccca3
commit fa713c3d23
1 changed files with 6 additions and 1 deletions

View File

@ -567,7 +567,12 @@ static HCRYPTMSG CHashEncodeMsg_Open(DWORD dwFlags, const void *pvMsgEncodeInfo,
prov = info->hCryptProv;
else
{
prov = I_CryptGetDefaultCryptProv(0);
prov = I_CryptGetDefaultCryptProv(algID);
if (!prov)
{
SetLastError(E_INVALIDARG);
return NULL;
}
dwFlags &= ~CMSG_CRYPT_RELEASE_CONTEXT_FLAG;
}
msg = CryptMemAlloc(sizeof(CHashEncodeMsg));