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);
|
SetLastError(E_INVALIDARG);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
if (!cContext)
|
||||||
|
{
|
||||||
|
SetLastError(E_INVALIDARG);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
memset(&pRevStatus->dwIndex, 0, pRevStatus->cbSize - sizeof(DWORD));
|
memset(&pRevStatus->dwIndex, 0, pRevStatus->cbSize - sizeof(DWORD));
|
||||||
if (dwRevType != CERT_CONTEXT_REVOCATION_TYPE)
|
if (dwRevType != CERT_CONTEXT_REVOCATION_TYPE)
|
||||||
{
|
{
|
||||||
|
|
|
@ -506,19 +506,16 @@ static void test_verifyRevocation(void)
|
||||||
}
|
}
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = pCertVerifyRevocation(0, 0, 0, NULL, 0, NULL, &status);
|
ret = pCertVerifyRevocation(0, 0, 0, NULL, 0, NULL, &status);
|
||||||
todo_wine
|
|
||||||
ok(!ret && GetLastError() == E_INVALIDARG,
|
ok(!ret && GetLastError() == E_INVALIDARG,
|
||||||
"expected E_INVALIDARG, got %08x\n", GetLastError());
|
"expected E_INVALIDARG, got %08x\n", GetLastError());
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = pCertVerifyRevocation(X509_ASN_ENCODING, 0, 0, NULL, 0, NULL,
|
ret = pCertVerifyRevocation(X509_ASN_ENCODING, 0, 0, NULL, 0, NULL,
|
||||||
&status);
|
&status);
|
||||||
todo_wine
|
|
||||||
ok(!ret && GetLastError() == E_INVALIDARG,
|
ok(!ret && GetLastError() == E_INVALIDARG,
|
||||||
"expected E_INVALIDARG, got %08x\n", GetLastError());
|
"expected E_INVALIDARG, got %08x\n", GetLastError());
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = pCertVerifyRevocation(0, CERT_CONTEXT_REVOCATION_TYPE, 0, NULL, 0,
|
ret = pCertVerifyRevocation(0, CERT_CONTEXT_REVOCATION_TYPE, 0, NULL, 0,
|
||||||
NULL, &status);
|
NULL, &status);
|
||||||
todo_wine
|
|
||||||
ok(!ret && GetLastError() == E_INVALIDARG,
|
ok(!ret && GetLastError() == E_INVALIDARG,
|
||||||
"expected E_INVALIDARG, got %08x\n", GetLastError());
|
"expected E_INVALIDARG, got %08x\n", GetLastError());
|
||||||
certs[0] = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert,
|
certs[0] = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert,
|
||||||
|
|
Loading…
Reference in New Issue