Commit 961d65ab authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

crypt32/tests: Don't crash on Vista.

parent b6c52ce9
...@@ -1579,9 +1579,13 @@ static void testGetCertChain(void) ...@@ -1579,9 +1579,13 @@ static void testGetCertChain(void)
DWORD i; DWORD i;
/* Basic parameter checks */ /* Basic parameter checks */
if (0)
{
/* Crash on Vista */
ret = pCertGetCertificateChain(NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL); ret = pCertGetCertificateChain(NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL);
ok(!ret && GetLastError() == E_INVALIDARG, ok(!ret && GetLastError() == E_INVALIDARG,
"Expected E_INVALIDARG, got %08x\n", GetLastError()); "Expected E_INVALIDARG, got %08x\n", GetLastError());
}
ret = pCertGetCertificateChain(NULL, NULL, NULL, NULL, NULL, 0, NULL, ret = pCertGetCertificateChain(NULL, NULL, NULL, NULL, NULL, 0, NULL,
&chain); &chain);
ok(!ret && GetLastError() == E_INVALIDARG, ok(!ret && GetLastError() == E_INVALIDARG,
...@@ -1593,9 +1597,13 @@ static void testGetCertChain(void) ...@@ -1593,9 +1597,13 @@ static void testGetCertChain(void)
*/ */
cert = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, cert = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert,
sizeof(bigCert)); sizeof(bigCert));
if (0)
{
/* Crash on Vista */
ret = pCertGetCertificateChain(NULL, cert, NULL, NULL, NULL, 0, NULL, NULL); ret = pCertGetCertificateChain(NULL, cert, NULL, NULL, NULL, 0, NULL, NULL);
ok(!ret && GetLastError() == E_INVALIDARG, ok(!ret && GetLastError() == E_INVALIDARG,
"Expected E_INVALIDARG, got %08x\n", GetLastError()); "Expected E_INVALIDARG, got %08x\n", GetLastError());
}
/* Crash /* Crash
ret = pCertGetCertificateChain(NULL, cert, NULL, NULL, &para, 0, NULL, NULL); ret = pCertGetCertificateChain(NULL, cert, NULL, NULL, &para, 0, NULL, NULL);
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment