Juan Lang : cryptnet/tests: Partially revert commit de6e33f306a3b1b424ad1a9c41e85d3692ef9e4d.
Alexandre Julliard
julliard at winehq.org
Fri Mar 11 10:23:37 CST 2011
Module: wine
Branch: master
Commit: 016795a9bfbd59d1587a6db930bcbd79d9ae34bb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=016795a9bfbd59d1587a6db930bcbd79d9ae34bb
Author: Juan Lang <juan.lang at gmail.com>
Date: Thu Mar 10 11:22:57 2011 -0800
cryptnet/tests: Partially revert commit de6e33f306a3b1b424ad1a9c41e85d3692ef9e4d.
It introduced new (old) test failures on some still-tested Windows
versions.
---
dlls/cryptnet/tests/cryptnet.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/dlls/cryptnet/tests/cryptnet.c b/dlls/cryptnet/tests/cryptnet.c
index a7fc9ec..ba6298d 100644
--- a/dlls/cryptnet/tests/cryptnet.c
+++ b/dlls/cryptnet/tests/cryptnet.c
@@ -365,8 +365,9 @@ static void test_retrieveObjectByUrl(void)
SetLastError(0xdeadbeef);
ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CRL, 0, 0, (void **)&crl,
NULL, NULL, NULL, NULL);
- /* w2k3,XP, newer w2k: CRYPT_E_NO_MATCH */
- ok(!ret && (GetLastError() == CRYPT_E_NO_MATCH),
+ /* w2k3,XP, newer w2k: CRYPT_E_NO_MATCH, older w2k: CRYPT_E_ASN1_BADTAG */
+ ok(!ret && (GetLastError() == CRYPT_E_NO_MATCH ||
+ broken(GetLastError() == CRYPT_E_NO_MATCH)),
"got 0x%x/%u (expected CRYPT_E_NO_MATCH)\n", GetLastError(), GetLastError());
/* only newer versions of cryptnet do the cleanup */
@@ -405,8 +406,9 @@ static void test_retrieveObjectByUrl(void)
cert = (PCCERT_CONTEXT)0xdeadbeef;
ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CERTIFICATE, 0, 0,
(void **)&cert, NULL, NULL, NULL, &aux);
- /* w2k: success */
- ok(ret, "got %u with 0x%x/%u (expected '!=0' or '0' with E_INVALIDARG)\n",
+ /* w2k: failure with E_INVALIDARG */
+ ok(ret || broken(GetLastError() == E_INVALIDARG),
+ "got %u with 0x%x/%u (expected '!=0' or '0' with E_INVALIDARG)\n",
ret, GetLastError(), GetLastError());
if (cert && cert != (PCCERT_CONTEXT)0xdeadbeef)
CertFreeCertificateContext(cert);
@@ -415,8 +417,9 @@ static void test_retrieveObjectByUrl(void)
aux.cbSize = sizeof(aux);
ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CERTIFICATE, 0, 0,
(void **)&cert, NULL, NULL, NULL, &aux);
- /* w2k: success */
- ok(ret, "got %u with 0x%x/%u (expected '!=0' or '0' with E_INVALIDARG)\n",
+ /* w2k: failure with E_INVALIDARG */
+ ok(ret || broken(GetLastError() == E_INVALIDARG),
+ "got %u with 0x%x/%u (expected '!=0' or '0' with E_INVALIDARG)\n",
ret, GetLastError(), GetLastError());
if (!ret) {
/* no more tests useful */
More information about the wine-cvs
mailing list