Author: akhaldi
Date: Tue Mar 1 19:21:01 2016
New Revision: 70852
URL:
http://svn.reactos.org/svn/reactos?rev=70852&view=rev
Log:
[CRYPT32_WINETEST] Sync with Wine Staging 1.9.4. CORE-10912
Modified:
trunk/rostests/winetests/crypt32/base64.c
trunk/rostests/winetests/crypt32/cert.c
trunk/rostests/winetests/crypt32/chain.c
trunk/rostests/winetests/crypt32/store.c
trunk/rostests/winetests/crypt32/str.c
Modified: trunk/rostests/winetests/crypt32/base64.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/base64.…
==============================================================================
--- trunk/rostests/winetests/crypt32/base64.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/crypt32/base64.c [iso-8859-1] Tue Mar 1 19:21:01 2016
@@ -319,20 +319,20 @@
ret = pCryptStringToBinaryA(NULL, 0, 0, NULL, NULL, NULL, NULL);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "Expected ERROR_INVALID_PARAMETER, got ret=%d le=%u\n", ret,
GetLastError());
ret = pCryptStringToBinaryA(NULL, 0, 0, NULL, &bufLen, NULL, NULL);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
- "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ "Expected ERROR_INVALID_PARAMETER, got ret=%d le=%u\n", ret,
GetLastError());
/* Bogus format */
ret = pCryptStringToBinaryA(tests[0].base64, 0, 0, NULL, &bufLen, NULL,
NULL);
ok(!ret && GetLastError() == ERROR_INVALID_DATA,
- "Expected ERROR_INVALID_DATA, got %d\n", GetLastError());
+ "Expected ERROR_INVALID_DATA, got ret=%d le=%u\n", ret, GetLastError());
/* Decoding doesn't expect the NOCR flag to be specified */
ret = pCryptStringToBinaryA(tests[0].base64, 1,
CRYPT_STRING_BASE64 | CRYPT_STRING_NOCR, NULL, &bufLen, NULL, NULL);
ok(!ret && GetLastError() == ERROR_INVALID_DATA,
- "Expected ERROR_INVALID_DATA, got %d\n", GetLastError());
+ "Expected ERROR_INVALID_DATA, got ret=%d le=%u\n", ret, GetLastError());
/* Bad strings */
for (i = 0; i < sizeof(badStrings) / sizeof(badStrings[0]); i++)
{
@@ -340,7 +340,7 @@
ret = pCryptStringToBinaryA(badStrings[i].str, 0, badStrings[i].format,
NULL, &bufLen, NULL, NULL);
ok(!ret && GetLastError() == ERROR_INVALID_DATA,
- "Expected ERROR_INVALID_DATA, got %d\n", GetLastError());
+ "Expected ERROR_INVALID_DATA, got ret=%d le=%u\n", ret,
GetLastError());
}
/* Good strings */
for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++)
Modified: trunk/rostests/winetests/crypt32/cert.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/cert.c?…
==============================================================================
--- trunk/rostests/winetests/crypt32/cert.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/crypt32/cert.c [iso-8859-1] Tue Mar 1 19:21:01 2016
@@ -3627,7 +3627,6 @@
"expected CRYPT_E_NO_REVOCATION_CHECK or CRYPT_E_REVOCATION_OFFLINE, got
%08x\n",
status.dwError);
ok(status.dwIndex == 0, "expected index 0, got %d\n", status.dwIndex);
- ok(status.dwIndex == 0, "expected index 0, got %d\n", status.dwIndex);
/* Now add a CRL to the hCrlStore */
revPara.hCrlStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0,
CERT_STORE_CREATE_NEW_FLAG, NULL);
Modified: trunk/rostests/winetests/crypt32/chain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/chain.c…
==============================================================================
--- trunk/rostests/winetests/crypt32/chain.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/crypt32/chain.c [iso-8859-1] Tue Mar 1 19:21:01 2016
@@ -2809,10 +2809,7 @@
checkTime->wDay, checkTime->wMonth, checkTime->wYear);
ret = pCertGetCertificateChain(engine, endCert, &fileTime,
includeStore ? store : NULL, &chainPara, flags, NULL, &chain);
- if (todo & TODO_CHAIN)
- todo_wine ok(ret, "Chain %d: CertGetCertificateChain failed:
%08x\n",
- testIndex, GetLastError());
- else
+ todo_wine_if (todo & TODO_CHAIN)
ok(ret, "Chain %d: CertGetCertificateChain failed: %08x\n",
testIndex, GetLastError());
CertFreeCertificateContext(endCert);
@@ -2838,15 +2835,7 @@
"%s[%d], element [%d,%d]: expected error %08x, got %08x\n",
testName, testIndex, chainIndex, elementIndex, expected->dwErrorStatus,
got->dwErrorStatus);
- else if (todo & TODO_ERROR)
- todo_wine
- ok(got->dwErrorStatus == expected->dwErrorStatus ||
- broken((got->dwErrorStatus & ~ignore->dwErrorStatus) ==
- (expected->dwErrorStatus & ~ignore->dwErrorStatus)),
- "%s[%d], element [%d,%d]: expected error %08x, got %08x\n",
- testName, testIndex, chainIndex, elementIndex, expected->dwErrorStatus,
- got->dwErrorStatus);
- else
+ else todo_wine_if (todo & TODO_ERROR)
ok(got->dwErrorStatus == expected->dwErrorStatus ||
broken((got->dwErrorStatus & ~ignore->dwErrorStatus) ==
(expected->dwErrorStatus & ~ignore->dwErrorStatus)),
@@ -2859,15 +2848,7 @@
"%s[%d], element [%d,%d]: expected info %08x, got %08x\n",
testName, testIndex, chainIndex, elementIndex, expected->dwInfoStatus,
got->dwInfoStatus);
- else if (todo & TODO_INFO)
- todo_wine
- ok(got->dwInfoStatus == expected->dwInfoStatus ||
- broken((got->dwInfoStatus & ~ignore->dwInfoStatus) ==
- (expected->dwInfoStatus & ~ignore->dwInfoStatus)),
- "%s[%d], element [%d,%d]: expected info %08x, got %08x\n",
- testName, testIndex, chainIndex, elementIndex, expected->dwInfoStatus,
- got->dwInfoStatus);
- else
+ else todo_wine_if (todo & TODO_INFO)
ok(got->dwInfoStatus == expected->dwInfoStatus ||
broken((got->dwInfoStatus & ~ignore->dwInfoStatus) ==
(expected->dwInfoStatus & ~ignore->dwInfoStatus)),
@@ -2881,11 +2862,7 @@
const CERT_TRUST_STATUS *ignore, DWORD todo, LPCSTR testName, DWORD testIndex,
DWORD chainIndex)
{
- if (todo & TODO_ELEMENTS)
- todo_wine ok(simpleChain->cElement == simpleChainStatus->cElement,
- "%s[%d]: expected %d elements, got %d\n", testName, testIndex,
- simpleChainStatus->cElement, simpleChain->cElement);
- else
+ todo_wine_if (todo & TODO_ELEMENTS)
ok(simpleChain->cElement == simpleChainStatus->cElement,
"%s[%d]: expected %d elements, got %d\n", testName, testIndex,
simpleChainStatus->cElement, simpleChain->cElement);
@@ -2915,18 +2892,8 @@
ok(chain->cChain == chainStatus->cChain,
"%s[%d]: expected %d simple chains, got %d\n", testName, testIndex,
chainStatus->cChain, chain->cChain);
- if (todo & TODO_ERROR &&
+ todo_wine_if (todo & TODO_ERROR &&
chain->TrustStatus.dwErrorStatus != chainStatus->status.dwErrorStatus)
- todo_wine ok(chain->TrustStatus.dwErrorStatus ==
- chainStatus->status.dwErrorStatus ||
- broken((chain->TrustStatus.dwErrorStatus &
- ~chainStatus->statusToIgnore.dwErrorStatus) ==
- (chainStatus->status.dwErrorStatus &
- ~chainStatus->statusToIgnore.dwErrorStatus)),
- "%s[%d]: expected error %08x, got %08x\n",
- testName, testIndex, chainStatus->status.dwErrorStatus,
- chain->TrustStatus.dwErrorStatus);
- else
ok(chain->TrustStatus.dwErrorStatus ==
chainStatus->status.dwErrorStatus ||
broken((chain->TrustStatus.dwErrorStatus &
@@ -2937,18 +2904,8 @@
"Verisign root certificate is available.\n",
testName, testIndex, chainStatus->status.dwErrorStatus,
chain->TrustStatus.dwErrorStatus, CERT_TRUST_IS_UNTRUSTED_ROOT);
- if (todo & TODO_INFO &&
+ todo_wine_if (todo & TODO_INFO &&
chain->TrustStatus.dwInfoStatus != chainStatus->status.dwInfoStatus)
- todo_wine ok(chain->TrustStatus.dwInfoStatus ==
- chainStatus->status.dwInfoStatus ||
- broken((chain->TrustStatus.dwInfoStatus &
- ~chainStatus->statusToIgnore.dwInfoStatus) ==
- (chainStatus->status.dwInfoStatus &
- ~chainStatus->statusToIgnore.dwInfoStatus)),
- "%s[%d]: expected info %08x, got %08x\n",
- testName, testIndex, chainStatus->status.dwInfoStatus,
- chain->TrustStatus.dwInfoStatus);
- else
ok(chain->TrustStatus.dwInfoStatus ==
chainStatus->status.dwInfoStatus ||
broken((chain->TrustStatus.dwInfoStatus &
@@ -4411,16 +4368,7 @@
}
if (ret)
{
- if (check->todo & TODO_ERROR)
- todo_wine ok(policyStatus.dwError == check->status.dwError ||
- broken(policyStatus.dwError == CERT_TRUST_NO_ERROR) ||
- (check->brokenStatus && broken(policyStatus.dwError ==
- check->brokenStatus->dwError)),
- "%s[%d](%s): expected %08x, got %08x\n",
- testName, testIndex,
- IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy,
- check->status.dwError, policyStatus.dwError);
- else
+ todo_wine_if (check->todo & TODO_ERROR)
ok(policyStatus.dwError == check->status.dwError ||
broken(policyStatus.dwError == CERT_TRUST_NO_ERROR) ||
(check->brokenStatus && broken(policyStatus.dwError ==
@@ -4438,16 +4386,7 @@
pCertFreeCertificateChain(chain);
return;
}
- if (check->todo & TODO_CHAINS)
- todo_wine ok(policyStatus.lChainIndex ==
- check->status.lChainIndex ||
- (check->brokenStatus && broken(policyStatus.lChainIndex ==
- check->brokenStatus->lChainIndex)),
- "%s[%d](%s): expected %d, got %d\n",
- testName, testIndex,
- IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy,
- check->status.lChainIndex, policyStatus.lChainIndex);
- else
+ todo_wine_if (check->todo & TODO_CHAINS)
ok(policyStatus.lChainIndex == check->status.lChainIndex ||
(check->brokenStatus && broken(policyStatus.lChainIndex ==
check->brokenStatus->lChainIndex)),
@@ -4455,21 +4394,12 @@
testName, testIndex,
IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy,
check->status.lChainIndex, policyStatus.lChainIndex);
- if (check->todo & TODO_ELEMENTS)
- todo_wine ok(policyStatus.lElementIndex ==
- check->status.lElementIndex ||
+ todo_wine_if (check->todo & TODO_ELEMENTS)
+ ok(policyStatus.lElementIndex == check->status.lElementIndex ||
(check->brokenStatus && broken(policyStatus.lElementIndex ==
check->brokenStatus->lElementIndex)),
"%s[%d](%s): expected %d, got %d\n",
testName, testIndex,
- IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy,
- check->status.lElementIndex, policyStatus.lElementIndex);
- else
- ok(policyStatus.lElementIndex == check->status.lElementIndex ||
- (check->brokenStatus && broken(policyStatus.lElementIndex ==
- check->brokenStatus->lElementIndex)),
- testName, testIndex,
- "%s[%d](%s): expected %d, got %d\n",
IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy,
check->status.lElementIndex, policyStatus.lElementIndex);
}
Modified: trunk/rostests/winetests/crypt32/store.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/store.c…
==============================================================================
--- trunk/rostests/winetests/crypt32/store.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/crypt32/store.c [iso-8859-1] Tue Mar 1 19:21:01 2016
@@ -317,11 +317,7 @@
ret = CertSaveStore(store, X509_ASN_ENCODING, CERT_STORE_SAVE_AS_STORE,
CERT_STORE_SAVE_TO_MEMORY, &blob, 0);
ok(ret, "CertSaveStore failed: %08x\n", GetLastError());
- if (todo)
- todo_wine
- ok(blob.cbData == cb, "%s: expected size %d, got %d\n", name, cb,
- blob.cbData);
- else
+ todo_wine_if (todo)
ok(blob.cbData == cb, "%s: expected size %d, got %d\n", name, cb,
blob.cbData);
blob.pbData = HeapAlloc(GetProcessHeap(), 0, blob.cbData);
@@ -330,10 +326,7 @@
ret = CertSaveStore(store, X509_ASN_ENCODING, CERT_STORE_SAVE_AS_STORE,
CERT_STORE_SAVE_TO_MEMORY, &blob, 0);
ok(ret, "CertSaveStore failed: %08x\n", GetLastError());
- if (todo)
- todo_wine
- ok(!memcmp(pb, blob.pbData, cb), "%s: unexpected value\n", name);
- else
+ todo_wine_if (todo)
ok(!memcmp(pb, blob.pbData, cb), "%s: unexpected value\n", name);
HeapFree(GetProcessHeap(), 0, blob.pbData);
}
Modified: trunk/rostests/winetests/crypt32/str.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/str.c?r…
==============================================================================
--- trunk/rostests/winetests/crypt32/str.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/crypt32/str.c [iso-8859-1] Tue Mar 1 19:21:01 2016
@@ -254,16 +254,7 @@
{
ret = pCertRDNValueToStrA(attrs[i].dwValueType, &attrs[i].Value,
buffer, sizeof(buffer));
- if (attrs[i].todo)
- {
- todo_wine
- ok(ret == strlen(attrs[i].str) + 1, "Expected length %d, got
%d\n",
- lstrlenA(attrs[i].str) + 1, ret);
- todo_wine
- ok(!strcmp(buffer, attrs[i].str), "Expected %s, got %s\n",
- attrs[i].str, buffer);
- }
- else
+ todo_wine_if (attrs[i].todo)
{
ok(ret == strlen(attrs[i].str) + 1, "Expected length %d, got
%d\n",
lstrlenA(attrs[i].str) + 1, ret);
@@ -359,16 +350,7 @@
{
ret = pCertRDNValueToStrW(attrs[i].dwValueType, &attrs[i].Value,
buffer, sizeof(buffer) / sizeof(buffer[0]));
- if (attrs[i].todo)
- {
- todo_wine
- ok(ret == lstrlenW(attrs[i].str) + 1,
- "Expected length %d, got %d\n", lstrlenW(attrs[i].str) + 1, ret);
- todo_wine
- ok(!lstrcmpW(buffer, attrs[i].str), "Expected %s, got %s\n",
- wine_dbgstr_w(attrs[i].str), wine_dbgstr_w(buffer));
- }
- else
+ todo_wine_if (attrs[i].todo)
{
ok(ret == lstrlenW(attrs[i].str) + 1,
"Expected length %d, got %d\n", lstrlenW(attrs[i].str) + 1, ret);
@@ -394,27 +376,15 @@
DWORD i;
i = pCertNameToStrA(X509_ASN_ENCODING, pName, dwStrType, NULL, 0);
- if (todo)
- todo_wine
- ok(i == strlen(expected) + 1, "Expected %d chars, got %d\n",
- lstrlenA(expected) + 1, i);
- else
+ todo_wine_if (todo)
ok(i == strlen(expected) + 1, "Expected %d chars, got %d\n",
lstrlenA(expected) + 1, i);
i = pCertNameToStrA(X509_ASN_ENCODING,pName, dwStrType, buffer,
sizeof(buffer));
- if (todo)
- todo_wine
+ todo_wine_if (todo)
ok(i == strlen(expected) + 1, "Expected %d chars, got %d\n",
lstrlenA(expected) + 1, i);
- else
- ok(i == strlen(expected) + 1, "Expected %d chars, got %d\n",
- lstrlenA(expected) + 1, i);
- if (todo)
- todo_wine
- ok(!strcmp(buffer, expected), "Expected %s, got %s\n", expected,
- buffer);
- else
+ todo_wine_if (todo)
ok(!strcmp(buffer, expected), "Expected %s, got %s\n", expected,
buffer);
}
@@ -577,24 +547,15 @@
DWORD i;
i = pCertNameToStrW(X509_ASN_ENCODING,pName, dwStrType, NULL, 0);
- if (todo)
- todo_wine ok(i == lstrlenW(expected) + 1, "Expected %d chars, got
%d\n",
- lstrlenW(expected) + 1, i);
- else
+ todo_wine_if (todo)
ok(i == lstrlenW(expected) + 1, "Expected %d chars, got %d\n",
lstrlenW(expected) + 1, i);
i = pCertNameToStrW(X509_ASN_ENCODING,pName, dwStrType, buffer,
sizeof(buffer) / sizeof(buffer[0]));
- if (todo)
- todo_wine ok(i == lstrlenW(expected) + 1, "Expected %d chars, got
%d\n",
- lstrlenW(expected) + 1, i);
- else
+ todo_wine_if (todo)
ok(i == lstrlenW(expected) + 1, "Expected %d chars, got %d\n",
lstrlenW(expected) + 1, i);
- if (todo)
- todo_wine ok(!lstrcmpW(buffer, expected), "Expected %s, got %s\n",
- wine_dbgstr_w(expected), wine_dbgstr_w(buffer));
- else
+ todo_wine_if (todo)
ok(!lstrcmpW(buffer, expected), "Expected %s, got %s\n",
wine_dbgstr_w(expected), wine_dbgstr_w(buffer));
}