Author: akhaldi
Date: Sun Mar 19 17:12:49 2017
New Revision: 74201
URL:
http://svn.reactos.org/svn/reactos?rev=74201&view=rev
Log:
[WINTRUST_WINETEST] Sync with Wine Staging 2.2. CORE-12823
Modified:
trunk/rostests/winetests/wintrust/crypt.c
trunk/rostests/winetests/wintrust/softpub.c
Modified: trunk/rostests/winetests/wintrust/crypt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wintrust/crypt.…
==============================================================================
--- trunk/rostests/winetests/wintrust/crypt.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/wintrust/crypt.c [iso-8859-1] Sun Mar 19 17:12:49 2017
@@ -203,25 +203,27 @@
"Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
/* NULL GUID */
+ if (0) { /* crashes on 64-bit win10 */
ret = pCryptCATAdminAcquireContext(&hca, NULL, 0);
ok(ret, "Expected success, got FALSE with %d\n", GetLastError());
ok(hca != NULL, "Expected a context handle, got NULL\n");
- /* All NULL */
- SetLastError(0xdeadbeef);
- ret = pCryptCATAdminReleaseContext(NULL, 0);
+ /* Proper release */
+ SetLastError(0xdeadbeef);
+ ret = pCryptCATAdminReleaseContext(hca, 0);
+ ok(ret, "Expected success, got FALSE with %d\n", GetLastError());
+
+ /* Try to release a second time */
+ SetLastError(0xdeadbeef);
+ ret = pCryptCATAdminReleaseContext(hca, 0);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
-
- /* Proper release */
- SetLastError(0xdeadbeef);
- ret = pCryptCATAdminReleaseContext(hca, 0);
- ok(ret, "Expected success, got FALSE with %d\n", GetLastError());
-
- /* Try to release a second time */
- SetLastError(0xdeadbeef);
- ret = pCryptCATAdminReleaseContext(hca, 0);
+ }
+
+ /* All NULL */
+ SetLastError(0xdeadbeef);
+ ret = pCryptCATAdminReleaseContext(NULL, 0);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
@@ -1020,8 +1022,11 @@
catmember = NULL;
catmembertag = NULL;
while ((catmembertag = pCryptCATCDFEnumMembersByCDFTagEx(catcdf, catmembertag,
cdf_callback, &catmember, FALSE, NULL))) ;
- todo_wine
- CHECK_EXPECT(CRYPTCAT_E_AREA_MEMBER, CRYPTCAT_E_CDF_MEMBER_FILE_PATH);
+ ok(error_area == 0xffffffff || broken(error_area == CRYPTCAT_E_AREA_MEMBER) /* <
win81 */,
+ "Expected area 0xffffffff, got %08x\n", error_area);
+ ok(local_error == 0xffffffff || broken(local_error ==
CRYPTCAT_E_CDF_MEMBER_FILE_PATH) /* < win81 */,
+ "Expected error 0xffffffff, got %08x\n", local_error);
+
pCryptCATCDFClose(catcdf);
DeleteFileA(cdffileA);
todo_wine
Modified: trunk/rostests/winetests/wintrust/softpub.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wintrust/softpu…
==============================================================================
--- trunk/rostests/winetests/wintrust/softpub.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/wintrust/softpub.c [iso-8859-1] Sun Mar 19 17:12:49 2017
@@ -251,6 +251,8 @@
if (data.padwTrustStepErrors)
{
/* Apparently, cdwTrustStepErrors does not need to be set. */
+ memset(data.padwTrustStepErrors, 0,
+ TRUSTERROR_MAX_STEPS * sizeof(DWORD));
ret = funcs->pfnInitialize(&data);
ok(ret == S_OK, "Expected S_OK, got %08x\n", ret);
data.cdwTrustStepErrors = 1;
@@ -301,6 +303,7 @@
{
HRESULT ret;
CRYPT_PROVIDER_DATA data = { 0 };
+ CRYPT_PROVIDER_SIGSTATE sig_state = { 0 };
WINTRUST_DATA wintrust_data = { 0 };
WINTRUST_CERT_INFO certInfo = { sizeof(WINTRUST_CERT_INFO), 0 };
WINTRUST_FILE_INFO fileInfo = { sizeof(WINTRUST_FILE_INFO), 0 };
@@ -314,6 +317,7 @@
/* Crashes
ret = funcs->pfnObjectTrust(NULL);
*/
+ data.pSigState = &sig_state;
data.pWintrustData = &wintrust_data;
data.padwTrustStepErrors =
funcs->pfnAlloc(TRUSTERROR_MAX_STEPS * sizeof(DWORD));
@@ -542,6 +546,7 @@
static void testCertTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID)
{
CRYPT_PROVIDER_DATA data = { 0 };
+ CRYPT_PROVIDER_SIGSTATE sig_state = { 0 };
CRYPT_PROVIDER_SGNR sgnr = { sizeof(sgnr), { 0 } };
HRESULT ret;
BOOL b;
@@ -552,6 +557,7 @@
return;
}
+ data.pSigState = &sig_state;
data.padwTrustStepErrors =
funcs->pfnAlloc(TRUSTERROR_MAX_STEPS * sizeof(DWORD));
if (!data.padwTrustStepErrors)
@@ -777,15 +783,6 @@
ret = CryptSIPCreateIndirectData_p(&subjinfo, NULL, NULL);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
"expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
- count = 0xdeadbeef;
- SetLastError(0xdeadbeef);
- ret = CryptSIPCreateIndirectData_p(&subjinfo, &count, NULL);
- todo_wine
- ok(!ret && (GetLastError() == NTE_BAD_ALGID ||
- GetLastError() == ERROR_INVALID_PARAMETER /* Win7 */),
- "expected NTE_BAD_ALGID or ERROR_INVALID_PARAMETER, got %08x\n",
- GetLastError());
- ok(count == 0xdeadbeef, "expected count to be unmodified, got %d\n",
count);
subjinfo.DigestAlgorithm.pszObjId = oid_sha1;
count = 0xdeadbeef;
ret = CryptSIPCreateIndirectData_p(&subjinfo, &count, NULL);