Commit b40a406d authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: Tighten CertDuplicateCertificateContext test.

Test that the return from CertDuplicateCertificateContext is the same as its parameter.
parent 832dd3c7
......@@ -143,17 +143,11 @@ static void testDupCert(void)
dupContext = CertDuplicateCertificateContext(context);
ok(dupContext != NULL, "Expected valid duplicate\n");
if (dupContext)
{
ok(dupContext->cbCertEncoded == sizeof(bigCert),
"Expected cert of %d bytes, got %ld\n", sizeof(bigCert),
dupContext->cbCertEncoded);
ok(!memcmp(dupContext->pbCertEncoded, bigCert,
sizeof(bigCert)),
"Unexpected encoded cert in context\n");
ok(dupContext->hCertStore == store, "Unexpected store\n");
CertFreeCertificateContext(dupContext);
}
/* Not only is it a duplicate, it's identical: the address is the
* same.
*/
ok(dupContext == context, "Expected identical context addresses\n");
CertFreeCertificateContext(dupContext);
CertFreeCertificateContext(context);
}
CertCloseStore(store, 0);
......
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