mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 07:37:02 +00:00
crypt32: Don't crash when asked to verify a signature before the content has been finalized.
This commit is contained in:
parent
f98eb4a8a0
commit
b7d26dc9f5
1 changed files with 7 additions and 0 deletions
|
@ -2554,6 +2554,11 @@ static BOOL CDecodeSignedMsg_VerifySignature(CDecodeMsg *msg, PCERT_INFO info)
|
|||
BOOL ret = FALSE;
|
||||
DWORD i;
|
||||
|
||||
if (!msg->u.signed_data.signerHandles)
|
||||
{
|
||||
SetLastError(NTE_BAD_SIGNATURE);
|
||||
return FALSE;
|
||||
}
|
||||
for (i = 0; !ret && i < msg->u.signed_data.info->cSignerInfo; i++)
|
||||
{
|
||||
PCMSG_CMS_SIGNER_INFO signerInfo =
|
||||
|
@ -2596,6 +2601,8 @@ static BOOL CDecodeSignedMsg_VerifySignatureEx(CDecodeMsg *msg,
|
|||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
else if (para->dwSignerIndex >= msg->u.signed_data.info->cSignerInfo)
|
||||
SetLastError(CRYPT_E_SIGNER_NOT_FOUND);
|
||||
else if (!msg->u.signed_data.signerHandles)
|
||||
SetLastError(NTE_BAD_SIGNATURE);
|
||||
else
|
||||
{
|
||||
switch (para->dwSignerType)
|
||||
|
|
Loading…
Reference in a new issue