From 4a2e02d57d25518e61d03527c89d692ec829c105 Mon Sep 17 00:00:00 2001 From: Paul Vriens Date: Sat, 17 Jan 2009 16:02:36 +0100 Subject: [PATCH] wintrust: Add some CryptCATCDF stubs. --- dlls/wintrust/crypt.c | 48 +++++++++++++++++++++++++++++++++++++ dlls/wintrust/wintrust.spec | 8 +++---- include/mscat.h | 21 +++++++++++++++- 3 files changed, 72 insertions(+), 5 deletions(-) diff --git a/dlls/wintrust/crypt.c b/dlls/wintrust/crypt.c index 8049f33dcf9..cf8aa73f07f 100644 --- a/dlls/wintrust/crypt.c +++ b/dlls/wintrust/crypt.c @@ -961,6 +961,54 @@ BOOL WINAPI CryptSIPCreateIndirectData(SIP_SUBJECTINFO* pSubjectInfo, DWORD* pcb return FALSE; } + +/*********************************************************************** + * CryptCATCDFClose (WINTRUST.@) + */ +BOOL WINAPI CryptCATCDFClose(CRYPTCATCDF *pCDF) +{ + FIXME("(%p) stub\n", pCDF); + + return FALSE; +} + +/*********************************************************************** + * CryptCATCDFEnumCatAttributes (WINTRUST.@) + */ +CRYPTCATATTRIBUTE * WINAPI CryptCATCDFEnumCatAttributes(CRYPTCATCDF *pCDF, + CRYPTCATATTRIBUTE *pPrevAttr, + PFN_CDF_PARSE_ERROR_CALLBACK pfnParseError) +{ + FIXME("(%p %p %p) stub\n", pCDF, pPrevAttr, pfnParseError); + + return NULL; +} + +/*********************************************************************** + * CryptCATCDFEnumMembersByCDFTagEx (WINTRUST.@) + */ +LPWSTR WINAPI CryptCATCDFEnumMembersByCDFTagEx(CRYPTCATCDF *pCDF, LPWSTR pwszPrevCDFTag, + PFN_CDF_PARSE_ERROR_CALLBACK pfnParseError, + CRYPTCATMEMBER **ppMember, BOOL fContinueOnError, + LPVOID pvReserved) +{ + FIXME("(%p %s %p %p %d %p) stub\n", pCDF, debugstr_w(pwszPrevCDFTag), pfnParseError, + ppMember, fContinueOnError, pvReserved); + + return NULL; +} + +/*********************************************************************** + * CryptCATCDFOpen (WINTRUST.@) + */ +CRYPTCATCDF * WINAPI CryptCATCDFOpen(LPWSTR pwszFilePath, + PFN_CDF_PARSE_ERROR_CALLBACK pfnParseError) +{ + FIXME("(%s %p) stub\n", debugstr_w(pwszFilePath), pfnParseError); + + return NULL; +} + static BOOL WINTRUST_GetSignedMsgFromPEFile(SIP_SUBJECTINFO *pSubjectInfo, DWORD *pdwEncodingType, DWORD dwIndex, DWORD *pcbSignedDataMsg, BYTE *pbSignedDataMsg) diff --git a/dlls/wintrust/wintrust.spec b/dlls/wintrust/wintrust.spec index bf5ee1f096d..9c5b1cb8e20 100644 --- a/dlls/wintrust/wintrust.spec +++ b/dlls/wintrust/wintrust.spec @@ -9,14 +9,14 @@ @ stdcall CryptCATAdminReleaseContext(long long) @ stdcall CryptCATAdminRemoveCatalog(ptr wstr long) @ stdcall CryptCATAdminResolveCatalogPath(ptr wstr ptr long) -@ stub CryptCATCDFClose +@ stdcall CryptCATCDFClose(ptr) @ stub CryptCATCDFEnumAttributes @ stub CryptCATCDFEnumAttributesWithCDFTag -@ stub CryptCATCDFEnumCatAttributes +@ stdcall CryptCATCDFEnumCatAttributes(ptr ptr ptr) @ stub CryptCATCDFEnumMembers @ stub CryptCATCDFEnumMembersByCDFTag -@ stub CryptCATCDFEnumMembersByCDFTagEx -@ stub CryptCATCDFOpen +@ stdcall CryptCATCDFEnumMembersByCDFTagEx(ptr wstr ptr ptr long ptr) +@ stdcall CryptCATCDFOpen(wstr ptr) @ stdcall CryptCATCatalogInfoFromContext(ptr ptr long) @ stdcall CryptCATClose(long) @ stdcall CryptCATEnumerateAttr(ptr ptr ptr) diff --git a/include/mscat.h b/include/mscat.h index d037adce858..a45e024422c 100644 --- a/include/mscat.h +++ b/include/mscat.h @@ -71,8 +71,20 @@ typedef struct CATALOG_INFO_ WCHAR wszCatalogFile[MAX_PATH]; } CATALOG_INFO; +typedef struct CRYPTCATCDF_ +{ + DWORD cbStruct; + HANDLE hFile; + DWORD dwCurFilePos; + DWORD dwLastMemberOffset; + BOOL fEOF; + LPWSTR pwszResultDir; + HANDLE hCATStore; +} CRYPTCATCDF; + #include +typedef void (WINAPI *PFN_CDF_PARSE_ERROR_CALLBACK)(DWORD, DWORD, WCHAR *); BOOL WINAPI CryptCATAdminAcquireContext(HCATADMIN*,const GUID*,DWORD); HCATINFO WINAPI CryptCATAdminAddCatalog(HCATADMIN,PWSTR,PWSTR,DWORD); @@ -83,7 +95,14 @@ BOOL WINAPI CryptCATAdminReleaseContext(HCATADMIN,DWORD); BOOL WINAPI CryptCATAdminRemoveCatalog(HCATADMIN,LPCWSTR,DWORD); BOOL WINAPI CryptCATAdminResolveCatalogPath(HCATADMIN, WCHAR *, CATALOG_INFO *, DWORD); BOOL WINAPI CryptCATCatalogInfoFromContext(HCATINFO, CATALOG_INFO *, DWORD); -BOOL WINAPI CryptCATClose(HANDLE); +BOOL WINAPI CryptCATCDFClose(CRYPTCATCDF *); +CRYPTCATATTRIBUTE * WINAPI CryptCATCDFEnumCatAttributes(CRYPTCATCDF *, CRYPTCATATTRIBUTE *, + PFN_CDF_PARSE_ERROR_CALLBACK); +LPWSTR WINAPI CryptCATCDFEnumMembersByCDFTagEx(CRYPTCATCDF *, LPWSTR, + PFN_CDF_PARSE_ERROR_CALLBACK, + CRYPTCATMEMBER **, BOOL, LPVOID); +CRYPTCATCDF * WINAPI CryptCATCDFOpen(LPWSTR, PFN_CDF_PARSE_ERROR_CALLBACK); +BOOL WINAPI CryptCATClose(HANDLE); CRYPTCATATTRIBUTE * WINAPI CryptCATEnumerateAttr(HANDLE, CRYPTCATMEMBER *, CRYPTCATATTRIBUTE *); CRYPTCATATTRIBUTE * WINAPI CryptCATEnumerateCatAttr(HANDLE, CRYPTCATATTRIBUTE *); CRYPTCATMEMBER * WINAPI CryptCATEnumerateMember(HANDLE,CRYPTCATMEMBER *);