crypt32/tests: Don't crash on Vista.

This commit is contained in:
Paul Vriens 2008-09-05 13:27:41 +02:00 committed by Alexandre Julliard
parent b6c52ce996
commit 961d65ab30
1 changed files with 14 additions and 6 deletions

View File

@ -1579,9 +1579,13 @@ static void testGetCertChain(void)
DWORD i;
/* Basic parameter checks */
ret = pCertGetCertificateChain(NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL);
ok(!ret && GetLastError() == E_INVALIDARG,
"Expected E_INVALIDARG, got %08x\n", GetLastError());
if (0)
{
/* Crash on Vista */
ret = pCertGetCertificateChain(NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL);
ok(!ret && GetLastError() == E_INVALIDARG,
"Expected E_INVALIDARG, got %08x\n", GetLastError());
}
ret = pCertGetCertificateChain(NULL, NULL, NULL, NULL, NULL, 0, NULL,
&chain);
ok(!ret && GetLastError() == E_INVALIDARG,
@ -1593,9 +1597,13 @@ static void testGetCertChain(void)
*/
cert = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert,
sizeof(bigCert));
ret = pCertGetCertificateChain(NULL, cert, NULL, NULL, NULL, 0, NULL, NULL);
ok(!ret && GetLastError() == E_INVALIDARG,
"Expected E_INVALIDARG, got %08x\n", GetLastError());
if (0)
{
/* Crash on Vista */
ret = pCertGetCertificateChain(NULL, cert, NULL, NULL, NULL, 0, NULL, NULL);
ok(!ret && GetLastError() == E_INVALIDARG,
"Expected E_INVALIDARG, got %08x\n", GetLastError());
}
/* Crash
ret = pCertGetCertificateChain(NULL, cert, NULL, NULL, &para, 0, NULL, NULL);
*/