cryptnet: Check number of contexts in CertDllVerifyRevocation.
This commit is contained in:
parent
be1fd9b3f1
commit
a82678da97
|
@ -1467,6 +1467,11 @@ BOOL WINAPI CertDllVerifyRevocation(DWORD dwEncodingType, DWORD dwRevType,
|
|||
SetLastError(E_INVALIDARG);
|
||||
return FALSE;
|
||||
}
|
||||
if (!cContext)
|
||||
{
|
||||
SetLastError(E_INVALIDARG);
|
||||
return FALSE;
|
||||
}
|
||||
memset(&pRevStatus->dwIndex, 0, pRevStatus->cbSize - sizeof(DWORD));
|
||||
if (dwRevType != CERT_CONTEXT_REVOCATION_TYPE)
|
||||
{
|
||||
|
|
|
@ -506,19 +506,16 @@ static void test_verifyRevocation(void)
|
|||
}
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = pCertVerifyRevocation(0, 0, 0, NULL, 0, NULL, &status);
|
||||
todo_wine
|
||||
ok(!ret && GetLastError() == E_INVALIDARG,
|
||||
"expected E_INVALIDARG, got %08x\n", GetLastError());
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = pCertVerifyRevocation(X509_ASN_ENCODING, 0, 0, NULL, 0, NULL,
|
||||
&status);
|
||||
todo_wine
|
||||
ok(!ret && GetLastError() == E_INVALIDARG,
|
||||
"expected E_INVALIDARG, got %08x\n", GetLastError());
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = pCertVerifyRevocation(0, CERT_CONTEXT_REVOCATION_TYPE, 0, NULL, 0,
|
||||
NULL, &status);
|
||||
todo_wine
|
||||
ok(!ret && GetLastError() == E_INVALIDARG,
|
||||
"expected E_INVALIDARG, got %08x\n", GetLastError());
|
||||
certs[0] = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert,
|
||||
|
|
Loading…
Reference in New Issue