cryptnet/tests: Remove win9x hacks.
This commit is contained in:
parent
5c9d341c69
commit
de6e33f306
|
@ -365,12 +365,9 @@ static void test_retrieveObjectByUrl(void)
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CRL, 0, 0, (void **)&crl,
|
ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CRL, 0, 0, (void **)&crl,
|
||||||
NULL, NULL, NULL, NULL);
|
NULL, NULL, NULL, NULL);
|
||||||
/* w2k3,XP, newer w2k: CRYPT_E_NO_MATCH, 95: OSS_DATA_ERROR */
|
/* w2k3,XP, newer w2k: CRYPT_E_NO_MATCH */
|
||||||
ok(!ret && (GetLastError() == CRYPT_E_NO_MATCH ||
|
ok(!ret && (GetLastError() == CRYPT_E_NO_MATCH),
|
||||||
GetLastError() == CRYPT_E_ASN1_BADTAG ||
|
"got 0x%x/%u (expected CRYPT_E_NO_MATCH)\n", GetLastError(), GetLastError());
|
||||||
GetLastError() == OSS_DATA_ERROR),
|
|
||||||
"got 0x%x/%u (expected CRYPT_E_NO_MATCH or CRYPT_E_ASN1_BADTAG or "
|
|
||||||
"OSS_DATA_ERROR)\n", GetLastError(), GetLastError());
|
|
||||||
|
|
||||||
/* only newer versions of cryptnet do the cleanup */
|
/* only newer versions of cryptnet do the cleanup */
|
||||||
if(!ret && GetLastError() != CRYPT_E_ASN1_BADTAG &&
|
if(!ret && GetLastError() != CRYPT_E_ASN1_BADTAG &&
|
||||||
|
@ -408,9 +405,8 @@ static void test_retrieveObjectByUrl(void)
|
||||||
cert = (PCCERT_CONTEXT)0xdeadbeef;
|
cert = (PCCERT_CONTEXT)0xdeadbeef;
|
||||||
ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CERTIFICATE, 0, 0,
|
ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CERTIFICATE, 0, 0,
|
||||||
(void **)&cert, NULL, NULL, NULL, &aux);
|
(void **)&cert, NULL, NULL, NULL, &aux);
|
||||||
/* w2k: success, 9x: fail with E_INVALIDARG */
|
/* w2k: success */
|
||||||
ok(ret || (GetLastError() == E_INVALIDARG),
|
ok(ret, "got %u with 0x%x/%u (expected '!=0' or '0' with E_INVALIDARG)\n",
|
||||||
"got %u with 0x%x/%u (expected '!=0' or '0' with E_INVALIDARG)\n",
|
|
||||||
ret, GetLastError(), GetLastError());
|
ret, GetLastError(), GetLastError());
|
||||||
if (cert && cert != (PCCERT_CONTEXT)0xdeadbeef)
|
if (cert && cert != (PCCERT_CONTEXT)0xdeadbeef)
|
||||||
CertFreeCertificateContext(cert);
|
CertFreeCertificateContext(cert);
|
||||||
|
@ -419,9 +415,8 @@ static void test_retrieveObjectByUrl(void)
|
||||||
aux.cbSize = sizeof(aux);
|
aux.cbSize = sizeof(aux);
|
||||||
ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CERTIFICATE, 0, 0,
|
ret = CryptRetrieveObjectByUrlA(url, CONTEXT_OID_CERTIFICATE, 0, 0,
|
||||||
(void **)&cert, NULL, NULL, NULL, &aux);
|
(void **)&cert, NULL, NULL, NULL, &aux);
|
||||||
/* w2k: success, 9x: fail with E_INVALIDARG */
|
/* w2k: success */
|
||||||
ok(ret || (GetLastError() == E_INVALIDARG),
|
ok(ret, "got %u with 0x%x/%u (expected '!=0' or '0' with E_INVALIDARG)\n",
|
||||||
"got %u with 0x%x/%u (expected '!=0' or '0' with E_INVALIDARG)\n",
|
|
||||||
ret, GetLastError(), GetLastError());
|
ret, GetLastError(), GetLastError());
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
/* no more tests useful */
|
/* no more tests useful */
|
||||||
|
|
Loading…
Reference in New Issue