[PATCH] crypt32/tests: Fix failures on win7 and above

Detlef Riekenberg wine.dev at web.de
Mon Nov 26 16:20:23 CST 2012


http://test.winehq.org/data/tests/crypt32:chain.html

--
By by ... Detlef
---
 dlls/crypt32/tests/chain.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/dlls/crypt32/tests/chain.c b/dlls/crypt32/tests/chain.c
index 2e4da55..9624a81 100644
--- a/dlls/crypt32/tests/chain.c
+++ b/dlls/crypt32/tests/chain.c
@@ -4626,16 +4626,18 @@ static void testVerifyCertChainPolicy(void)
     ret = pCertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_BASE, chain, NULL,
      &policyStatus);
     ok(ret, "CertVerifyCertificateChainPolicy failed: %08x\n", GetLastError());
-    ok(policyStatus.dwError == CERT_E_UNTRUSTEDROOT,
-     "Expected CERT_E_UNTRUSTEDROOT, got %08x\n", policyStatus.dwError);
+    ok(policyStatus.dwError == CERT_E_UNTRUSTEDROOT ||
+        policyStatus.dwError == TRUST_E_CERT_SIGNATURE, /* win7 + win8 */
+        "Expected CERT_E_UNTRUSTEDROOT or TRUST_E_CERT_SIGNATURE, got %08x\n", policyStatus.dwError);
     ok(policyStatus.lChainIndex == 0 && policyStatus.lElementIndex == 0,
      "Expected both indexes 0, got %d, %d\n", policyStatus.lChainIndex,
      policyStatus.lElementIndex);
     ret = pCertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_BASE, chain,
      &policyPara, &policyStatus);
     ok(ret, "CertVerifyCertificateChainPolicy failed: %08x\n", GetLastError());
-    ok(policyStatus.dwError == CERT_E_UNTRUSTEDROOT,
-     "Expected CERT_E_UNTRUSTEDROOT, got %08x\n", policyStatus.dwError);
+    ok(policyStatus.dwError == CERT_E_UNTRUSTEDROOT ||
+        policyStatus.dwError == TRUST_E_CERT_SIGNATURE, /* win7 + win8 */
+        "Expected CERT_E_UNTRUSTEDROOT or TRUST_E_CERT_SIGNATURE, got %08x\n", policyStatus.dwError);
     ok(policyStatus.lChainIndex == 0 && policyStatus.lElementIndex == 0,
      "Expected both indexes 0, got %d, %d\n", policyStatus.lChainIndex,
      policyStatus.lElementIndex);
-- 
1.7.5.4




More information about the wine-patches mailing list