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:
parent
fd6e9ccca3
commit
fa713c3d23
|
@ -567,7 +567,12 @@ static HCRYPTMSG CHashEncodeMsg_Open(DWORD dwFlags, const void *pvMsgEncodeInfo,
|
||||||
prov = info->hCryptProv;
|
prov = info->hCryptProv;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
prov = I_CryptGetDefaultCryptProv(0);
|
prov = I_CryptGetDefaultCryptProv(algID);
|
||||||
|
if (!prov)
|
||||||
|
{
|
||||||
|
SetLastError(E_INVALIDARG);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
dwFlags &= ~CMSG_CRYPT_RELEASE_CONTEXT_FLAG;
|
dwFlags &= ~CMSG_CRYPT_RELEASE_CONTEXT_FLAG;
|
||||||
}
|
}
|
||||||
msg = CryptMemAlloc(sizeof(CHashEncodeMsg));
|
msg = CryptMemAlloc(sizeof(CHashEncodeMsg));
|
||||||
|
|
Loading…
Reference in New Issue