Commit b3db514c authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

wintrust/tests: Fix test on win9x.

parent f684dac0
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <softpub.h> #include <softpub.h>
#include <mssip.h> #include <mssip.h>
#include <winuser.h> #include <winuser.h>
#include "winnls.h"
#include "wine/test.h" #include "wine/test.h"
...@@ -250,9 +251,9 @@ static void testObjTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID) ...@@ -250,9 +251,9 @@ static void testObjTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID)
funcs->pfnAlloc(TRUSTERROR_MAX_STEPS * sizeof(DWORD)); funcs->pfnAlloc(TRUSTERROR_MAX_STEPS * sizeof(DWORD));
if (data.padwTrustStepErrors) if (data.padwTrustStepErrors)
{ {
static const WCHAR notepad[] = { '\\','n','o','t','e','p','a','d','.', static const CHAR notepad[] = "\\notepad.exe";
'e','x','e',0 }; CHAR notepadPath[MAX_PATH];
WCHAR notepadPath[MAX_PATH]; WCHAR notepadPathW[MAX_PATH];
PROVDATA_SIP provDataSIP = { 0 }; PROVDATA_SIP provDataSIP = { 0 };
static const GUID unknown = { 0xC689AAB8, 0x8E78, 0x11D0, { 0x8C,0x47, static const GUID unknown = { 0xC689AAB8, 0x8E78, 0x11D0, { 0x8C,0x47,
0x00,0xC0,0x4F,0xC2,0x95,0xEE } }; 0x00,0xC0,0x4F,0xC2,0x95,0xEE } };
...@@ -285,9 +286,11 @@ static void testObjTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID) ...@@ -285,9 +286,11 @@ static void testObjTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID)
/* Crashes /* Crashes
ret = funcs->pfnObjectTrust(&data); ret = funcs->pfnObjectTrust(&data);
*/ */
GetWindowsDirectoryW(notepadPath, MAX_PATH); /* Workaround missing W-functions for win9x */
lstrcatW(notepadPath, notepad); GetWindowsDirectoryA(notepadPath, MAX_PATH);
fileInfo.pcwszFilePath = notepadPath; lstrcatA(notepadPath, notepad);
MultiByteToWideChar(0, 0, notepadPath, -1, notepadPathW, MAX_PATH);
fileInfo.pcwszFilePath = notepadPathW;
/* pfnObjectTrust now crashes unless both pPDSip and psPfns are set */ /* pfnObjectTrust now crashes unless both pPDSip and psPfns are set */
U(data).pPDSip = &provDataSIP; U(data).pPDSip = &provDataSIP;
data.psPfns = (CRYPT_PROVIDER_FUNCTIONS *)funcs; data.psPfns = (CRYPT_PROVIDER_FUNCTIONS *)funcs;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment