From f4f01301f0007442ae5f40650615f2e00a5fbc94 Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Tue, 27 May 2014 13:25:01 +0100 Subject: [PATCH] crypt32: Add a new element to SIP_ADD_NEWPROVIDER. --- dlls/crypt32/sip.c | 2 +- dlls/msisip/main.c | 1 + dlls/wintrust/register.c | 1 + include/mssip.h | 3 +++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/crypt32/sip.c b/dlls/crypt32/sip.c index 4a32cada900..8b561fdc2c7 100644 --- a/dlls/crypt32/sip.c +++ b/dlls/crypt32/sip.c @@ -210,7 +210,7 @@ BOOL WINAPI CryptSIPAddProvider(SIP_ADD_NEWPROVIDER *psNewProv) TRACE("%p\n", psNewProv); if (!psNewProv || - psNewProv->cbStruct != sizeof(SIP_ADD_NEWPROVIDER) || + psNewProv->cbStruct < FIELD_OFFSET(SIP_ADD_NEWPROVIDER, pwszGetCapFuncName) || !psNewProv->pwszGetFuncName || !psNewProv->pwszPutFuncName || !psNewProv->pwszCreateFuncName || diff --git a/dlls/msisip/main.c b/dlls/msisip/main.c index 0b4d2c3cc9a..882db3d9d84 100644 --- a/dlls/msisip/main.c +++ b/dlls/msisip/main.c @@ -81,6 +81,7 @@ HRESULT WINAPI DllRegisterServer(void) prov.pwszVerifyFuncName = verifyIndirectData; prov.pwszRemoveFuncName = removeSignedDataMsg; prov.pwszIsFunctionNameFmt2 = isMyTypeOfFile; + prov.pwszGetCapFuncName = NULL; return CryptSIPAddProvider(&prov) ? S_OK : S_FALSE; } diff --git a/dlls/wintrust/register.c b/dlls/wintrust/register.c index f039fbdcab6..9981fbccb47 100644 --- a/dlls/wintrust/register.c +++ b/dlls/wintrust/register.c @@ -911,6 +911,7 @@ static BOOL WINTRUST_SIPPAddProvider(GUID* Subject, WCHAR* MagicNumber) NewProv.pwszVerifyFuncName = CryptSIPVerifyIndirectData; NewProv.pwszRemoveFuncName = CryptSIPRemoveSignedDataMsg; NewProv.pwszIsFunctionNameFmt2 = NULL; + NewProv.pwszGetCapFuncName = NULL; Ret = CryptSIPAddProvider(&NewProv); diff --git a/include/mssip.h b/include/mssip.h index b0b21a60a7f..c14f02de5f8 100644 --- a/include/mssip.h +++ b/include/mssip.h @@ -156,6 +156,9 @@ typedef struct SIP_ADD_NEWPROVIDER_ WCHAR *pwszRemoveFuncName; WCHAR *pwszIsFunctionNameFmt2; + + /* NTDDI_VERSION >= NTDDI_WIN8 */ + WCHAR *pwszGetCapFuncName; } SIP_ADD_NEWPROVIDER, *PSIP_ADD_NEWPROVIDER; #include