Author: cwittich
Date: Sat Jan 31 23:42:03 2009
New Revision: 39255
URL:
http://svn.reactos.org/svn/reactos?rev=39255&view=rev
Log:
sync wintrust and mscat32 with wine 1.1.14
Modified:
trunk/reactos/dll/win32/mscat32/mscat32.spec
trunk/reactos/dll/win32/wintrust/asn.c
trunk/reactos/dll/win32/wintrust/crypt.c
trunk/reactos/dll/win32/wintrust/softpub.c
trunk/reactos/dll/win32/wintrust/wintrust.spec
trunk/reactos/dll/win32/wintrust/wintrust_main.c
trunk/reactos/include/psdk/mscat.h
Modified: trunk/reactos/dll/win32/mscat32/mscat32.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mscat32/mscat32.…
==============================================================================
--- trunk/reactos/dll/win32/mscat32/mscat32.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mscat32/mscat32.spec [iso-8859-1] Sat Jan 31 23:42:03 2009
@@ -5,30 +5,30 @@
@ stdcall CryptCATAdminEnumCatalogFromHash(long ptr long long ptr)
wintrust.CryptCATAdminEnumCatalogFromHash
@ stdcall CryptCATAdminReleaseCatalogContext(long long long)
wintrust.CryptCATAdminReleaseCatalogContext
@ stdcall CryptCATAdminReleaseContext(long long) wintrust.CryptCATAdminReleaseContext
-@ stub CryptCATCDFClose
+@ stdcall CryptCATCDFClose(ptr) wintrust.CryptCATCDFClose
@ stub CryptCATCDFEnumAttributes
-@ stub CryptCATCDFEnumAttributesWithCDFTag
-@ stub CryptCATCDFEnumCatAttributes
+@ stdcall CryptCATCDFEnumAttributesWithCDFTag(ptr wstr ptr ptr ptr)
wintrust.CryptCATCDFEnumAttributesWithCDFTag
+@ stdcall CryptCATCDFEnumCatAttributes(ptr ptr ptr)
wintrust.CryptCATCDFEnumCatAttributes
@ stub CryptCATCDFEnumMembers
-@ stub CryptCATCDFEnumMembersByCDFTag
-@ stub CryptCATCDFOpen
-@ stub CryptCATCatalogInfoFromContext
+@ stdcall CryptCATCDFEnumMembersByCDFTag(ptr wstr ptr ptr long)
wintrust.CryptCATCDFEnumMembersByCDFTag
+@ stdcall CryptCATCDFOpen(wstr ptr) wintrust.CryptCATCDFOpen
+@ stdcall CryptCATCatalogInfoFromContext(ptr ptr long)
wintrust.CryptCATCatalogInfoFromContext
@ stdcall CryptCATClose(long) wintrust.CryptCATClose
-@ stub CryptCATEnumerateAttr
-@ stub CryptCATEnumerateCatAttr
+@ stdcall CryptCATEnumerateAttr(ptr ptr ptr) wintrust.CryptCATEnumerateAttr
+@ stdcall CryptCATEnumerateCatAttr(ptr ptr) wintrust.CryptCATEnumerateCatAttr
@ stdcall CryptCATEnumerateMember(long ptr) wintrust.CryptCATEnumerateMember
-@ stub CryptCATGetAttrInfo
-@ stub CryptCATGetCatAttrInfo
-@ stub CryptCATGetMemberInfo
-@ stub CryptCATHandleFromStore
+@ stdcall CryptCATGetAttrInfo(ptr ptr wstr) wintrust.CryptCATGetAttrInfo
+@ stdcall CryptCATGetCatAttrInfo(ptr wstr) wintrust.CryptCATGetCatAttrInfo
+@ stdcall CryptCATGetMemberInfo(ptr wstr) wintrust.CryptCATGetMemberInfo
+@ stdcall CryptCATHandleFromStore(ptr) wintrust.CryptCATHandleFromStore
@ stdcall CryptCATOpen(wstr long long long long) wintrust.CryptCATOpen
-@ stub CryptCATPersistStore
-@ stub CryptCATPutAttrInfo
-@ stub CryptCATPutCatAttrInfo
-@ stub CryptCATPutMemberInfo
-@ stub CryptCATStoreFromHandle
+@ stdcall CryptCATPersistStore(ptr) wintrust.CryptCATPersistStore
+@ stdcall CryptCATPutAttrInfo(ptr ptr wstr long long ptr) wintrust.CryptCATPutAttrInfo
+@ stdcall CryptCATPutCatAttrInfo(ptr wstr long long ptr) wintrust.CryptCATPutCatAttrInfo
+@ stdcall CryptCATPutMemberInfo(ptr wstr wstr ptr long long ptr)
wintrust.CryptCATPutMemberInfo
+@ stdcall CryptCATStoreFromHandle(ptr) wintrust.CryptCATStoreFromHandle
@ stdcall -private DllRegisterServer() wintrust.mscat32DllRegisterServer
@ stdcall -private DllUnregisterServer() wintrust.mscat32DllUnregisterServer
-@ stub IsCatalogFile
+@ stdcall IsCatalogFile(ptr wstr) wintrust.IsCatalogFile
@ stub MsCatConstructHashTag
@ stub MsCatFreeHashTag
Modified: trunk/reactos/dll/win32/wintrust/asn.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wintrust/asn.c?r…
==============================================================================
--- trunk/reactos/dll/win32/wintrust/asn.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wintrust/asn.c [iso-8859-1] Sat Jan 31 23:42:03 2009
@@ -100,7 +100,7 @@
DWORD *pcbEncoded)
{
BOOL ret = TRUE;
- const CRYPT_DATA_BLOB *blob = (const CRYPT_DATA_BLOB *)pvStructInfo;
+ const CRYPT_DATA_BLOB *blob = pvStructInfo;
DWORD bytesNeeded, lenBytes;
TRACE("(%d, %p), %p, %d\n", blob->cbData, blob->pbData, pbEncoded,
@@ -140,7 +140,7 @@
__TRY
{
- const SPC_LINK *link = (const SPC_LINK *)pvStructInfo;
+ const SPC_LINK *link = pvStructInfo;
DWORD bytesNeeded, lenBytes;
switch (link->dwLinkChoice)
@@ -352,7 +352,7 @@
__TRY
{
- const CRYPT_BIT_BLOB *blob = (const CRYPT_BIT_BLOB *)pvStructInfo;
+ const CRYPT_BIT_BLOB *blob = pvStructInfo;
DWORD bytesNeeded, lenBytes, dataBytes;
BYTE unusedBits;
@@ -426,8 +426,7 @@
DWORD *pcbEncoded)
{
BOOL ret;
- const struct AsnConstructedItem *item =
- (const struct AsnConstructedItem *)pvStructInfo;
+ const struct AsnConstructedItem *item = pvStructInfo;
DWORD len;
if ((ret = item->encodeFunc(dwCertEncodingType, lpszStructType,
@@ -473,8 +472,7 @@
LPCSTR lpszStructType, const void *pvStructInfo, BYTE *pbEncoded,
DWORD *pcbEncoded)
{
- const SPC_PE_IMAGE_DATA *imageData =
- (const SPC_PE_IMAGE_DATA *)pvStructInfo;
+ const SPC_PE_IMAGE_DATA *imageData = pvStructInfo;
BOOL ret = FALSE;
TRACE("(0x%08x, %s, %p, %p, %p)\n", dwCertEncodingType,
@@ -519,7 +517,7 @@
LPCSTR lpszStructType, const void *pvStructInfo, BYTE *pbEncoded,
DWORD *pcbEncoded)
{
- LPCSTR pszObjId = (LPCSTR)pvStructInfo;
+ LPCSTR pszObjId = pvStructInfo;
DWORD bytesNeeded = 0, lenBytes;
BOOL ret = TRUE;
int firstPos = 0;
@@ -637,7 +635,7 @@
LPCSTR lpszStructType, const void *pvStructInfo, BYTE *pbEncoded,
DWORD *pcbEncoded)
{
- const CRYPT_DER_BLOB *blob = (const CRYPT_DER_BLOB *)pvStructInfo;
+ const CRYPT_DER_BLOB *blob = pvStructInfo;
BOOL ret = TRUE;
if (!pbEncoded)
@@ -661,8 +659,7 @@
DWORD dwCertEncodingType, LPCSTR lpszStructType, const void *pvStructInfo,
BYTE *pbEncoded, DWORD *pcbEncoded)
{
- const CRYPT_ALGORITHM_IDENTIFIER *algo =
- (const CRYPT_ALGORITHM_IDENTIFIER *)pvStructInfo;
+ const CRYPT_ALGORITHM_IDENTIFIER *algo = pvStructInfo;
static const BYTE asn1Null[] = { ASN_NULL, 0 };
static const CRYPT_DATA_BLOB nullBlob = { sizeof(asn1Null),
(LPBYTE)asn1Null };
@@ -685,8 +682,7 @@
LPCSTR lpszStructType, const void *pvStructInfo, BYTE *pbEncoded,
DWORD *pcbEncoded)
{
- const CRYPT_ATTRIBUTE_TYPE_VALUE *typeValue =
- (const CRYPT_ATTRIBUTE_TYPE_VALUE *)pvStructInfo;
+ const CRYPT_ATTRIBUTE_TYPE_VALUE *typeValue = pvStructInfo;
struct AsnEncodeSequenceItem items[] = {
{ &typeValue->pszObjId, CRYPT_AsnEncodeOid, 0 },
{ &typeValue->Value, CRYPT_CopyEncodedBlob, 0 },
@@ -706,7 +702,7 @@
LPCSTR lpszStructType, const void *pvStructInfo, BYTE *pbEncoded,
DWORD *pcbEncoded)
{
- const struct SPCDigest *digest = (const struct SPCDigest *)pvStructInfo;
+ const struct SPCDigest *digest = pvStructInfo;
struct AsnEncodeSequenceItem items[] = {
{ &digest->DigestAlgorithm, CRYPT_AsnEncodeAlgorithmIdWithNullParams, 0 },
{ &digest->Digest, CRYPT_CopyEncodedBlob, 0 },
@@ -727,8 +723,7 @@
__TRY
{
- const SPC_INDIRECT_DATA_CONTENT *data =
- (const SPC_INDIRECT_DATA_CONTENT *)pvStructInfo;
+ const SPC_INDIRECT_DATA_CONTENT *data = pvStructInfo;
struct AsnEncodeSequenceItem items[] = {
{ &data->Data, CRYPT_AsnEncodeAttributeTypeValue, 0 },
{ &data->DigestAlgorithm, CRYPT_AsnEncodeSPCDigest, 0 },
@@ -750,7 +745,7 @@
DWORD *pcbEncoded)
{
BOOL ret = TRUE;
- LPCWSTR str = (LPCWSTR)pvStructInfo;
+ LPCWSTR str = pvStructInfo;
DWORD bytesNeeded, lenBytes, strLen;
if (str)
@@ -895,8 +890,7 @@
DWORD significantBytes, lenBytes, bytesNeeded;
BYTE padByte = 0;
BOOL pad = FALSE;
- const CRYPT_INTEGER_BLOB *blob =
- (const CRYPT_INTEGER_BLOB *)pvStructInfo;
+ const CRYPT_INTEGER_BLOB *blob = pvStructInfo;
significantBytes = blob->cbData;
if (significantBytes)
@@ -996,7 +990,7 @@
__TRY
{
- const CAT_MEMBERINFO *info = (const CAT_MEMBERINFO *)pvStructInfo;
+ const CAT_MEMBERINFO *info = pvStructInfo;
struct AsnEncodeSequenceItem items[] = {
{ info->pwszSubjGuid, CRYPT_AsnEncodeBMPString, 0 },
{ &info->dwCertVersion, CRYPT_AsnEncodeInt, 0 },
@@ -1024,7 +1018,7 @@
__TRY
{
- const CAT_NAMEVALUE *value = (const CAT_NAMEVALUE *)pvStructInfo;
+ const CAT_NAMEVALUE *value = pvStructInfo;
struct AsnEncodeSequenceItem items[] = {
{ value->pwszTag, CRYPT_AsnEncodeBMPString, 0 },
{ &value->fdwFlags, CRYPT_AsnEncodeInt, 0 },
@@ -1215,7 +1209,7 @@
CRYPT_DATA_BLOB *blob;
BYTE lenBytes = GET_LEN_BYTES(pbEncoded[1]);
- blob = (CRYPT_DATA_BLOB *)pvStructInfo;
+ blob = pvStructInfo;
blob->cbData = dataLen;
if (dwFlags & CRYPT_DECODE_NOCOPY_FLAG)
blob->pbData = (BYTE *)pbEncoded + 1 + lenBytes;
@@ -1260,7 +1254,7 @@
}
else
{
- PSPC_LINK link = (PSPC_LINK)pvStructInfo;
+ PSPC_LINK link = pvStructInfo;
DWORD i;
link->dwLinkChoice = SPC_URL_LINK_CHOICE;
@@ -1309,7 +1303,7 @@
}
else
{
- PSPC_LINK link = (PSPC_LINK)pvStructInfo;
+ PSPC_LINK link = pvStructInfo;
link->dwLinkChoice = SPC_MONIKER_LINK_CHOICE;
/* pwszFile pointer was set by caller, copy it
@@ -1347,7 +1341,7 @@
}
else
{
- PSPC_LINK link = (PSPC_LINK)pvStructInfo;
+ PSPC_LINK link = pvStructInfo;
DWORD i;
const BYTE *ptr = pbEncoded + 2 + lenBytes + realLenBytes;
@@ -1372,7 +1366,7 @@
}
else
{
- PSPC_LINK link = (PSPC_LINK)pvStructInfo;
+ PSPC_LINK link = pvStructInfo;
link->dwLinkChoice = SPC_FILE_LINK_CHOICE;
link->u.pwszFile[0] = '\0';
@@ -1415,7 +1409,7 @@
}
else
{
- SPC_LINK *link = (SPC_LINK *)pvStructInfo;
+ SPC_LINK *link = pvStructInfo;
link->u.pwszFile =
(LPWSTR)((BYTE *)pvStructInfo + sizeof(SPC_LINK));
@@ -1655,7 +1649,7 @@
*pcbStructInfo = bytesNeeded;
if (startingPointer)
- nextData = (BYTE *)startingPointer;
+ nextData = startingPointer;
else
nextData = (BYTE *)pvStructInfo + structSize;
memset(pvStructInfo, 0, structSize);
@@ -1706,7 +1700,7 @@
{
CRYPT_BIT_BLOB *blob;
- blob = (CRYPT_BIT_BLOB *)pvStructInfo;
+ blob = pvStructInfo;
blob->cbData = dataLen - 1;
blob->cUnusedBits = *(pbEncoded + 1 +
GET_LEN_BYTES(pbEncoded[1]));
@@ -1750,7 +1744,7 @@
{
BYTE lenBytes = GET_LEN_BYTES(pbEncoded[1]);
DWORD size;
- SPC_LINK **pLink = (SPC_LINK **)pvStructInfo;
+ SPC_LINK **pLink = pvStructInfo;
ret = CRYPT_AsnDecodeSPCLinkInternal(dwCertEncodingType, lpszStructType,
pbEncoded + 1 + lenBytes, dataLen, dwFlags, NULL, &size);
@@ -1959,7 +1953,7 @@
}
else
{
- PCRYPT_OBJID_BLOB blob = (PCRYPT_OBJID_BLOB)pvStructInfo;
+ PCRYPT_OBJID_BLOB blob = pvStructInfo;
*pcbStructInfo = bytesNeeded;
blob->cbData = cbEncoded;
@@ -1978,8 +1972,7 @@
LPCSTR lpszStructType, const BYTE *pbEncoded, DWORD cbEncoded, DWORD dwFlags,
void *pvStructInfo, DWORD *pcbStructInfo)
{
- CRYPT_ATTRIBUTE_TYPE_VALUE *typeValue =
- (CRYPT_ATTRIBUTE_TYPE_VALUE *)pvStructInfo;
+ CRYPT_ATTRIBUTE_TYPE_VALUE *typeValue = pvStructInfo;
struct AsnDecodeSequenceItem items[] = {
{ ASN_OBJECTIDENTIFIER, offsetof(CRYPT_ATTRIBUTE_TYPE_VALUE, pszObjId),
CRYPT_AsnDecodeOid, sizeof(LPSTR), FALSE, TRUE,
@@ -2002,8 +1995,7 @@
LPCSTR lpszStructType, const BYTE *pbEncoded, DWORD cbEncoded, DWORD dwFlags,
void *pvStructInfo, DWORD *pcbStructInfo)
{
- CRYPT_ALGORITHM_IDENTIFIER *algo =
- (CRYPT_ALGORITHM_IDENTIFIER *)pvStructInfo;
+ CRYPT_ALGORITHM_IDENTIFIER *algo = pvStructInfo;
BOOL ret = TRUE;
struct AsnDecodeSequenceItem items[] = {
{ ASN_OBJECTIDENTIFIER, offsetof(CRYPT_ALGORITHM_IDENTIFIER, pszObjId),
@@ -2032,8 +2024,7 @@
LPCSTR lpszStructType, const BYTE *pbEncoded, DWORD cbEncoded, DWORD dwFlags,
void *pvStructInfo, DWORD *pcbStructInfo)
{
- struct SPCDigest *digest =
- (struct SPCDigest *)pvStructInfo;
+ struct SPCDigest *digest = pvStructInfo;
struct AsnDecodeSequenceItem items[] = {
{ ASN_SEQUENCEOF, offsetof(struct SPCDigest, DigestAlgorithm),
CRYPT_AsnDecodeAlgorithmId, sizeof(CRYPT_ALGORITHM_IDENTIFIER),
@@ -2156,7 +2147,7 @@
}
else
{
- CRYPT_INTEGER_BLOB *blob = (CRYPT_INTEGER_BLOB *)pvStructInfo;
+ CRYPT_INTEGER_BLOB *blob = pvStructInfo;
*pcbStructInfo = bytesNeeded;
blob->cbData = dataLen;
Modified: trunk/reactos/dll/win32/wintrust/crypt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wintrust/crypt.c…
==============================================================================
--- trunk/reactos/dll/win32/wintrust/crypt.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wintrust/crypt.c [iso-8859-1] Sat Jan 31 23:42:03 2009
@@ -188,6 +188,8 @@
HeapFree(GetProcessHeap(), 0, target);
return NULL;
}
+ SetFileAttributesW(target, FILE_ATTRIBUTE_SYSTEM);
+
if (!(ci = HeapAlloc(GetProcessHeap(), 0, sizeof(*ci))))
{
HeapFree(GetProcessHeap(), 0, target);
@@ -959,6 +961,54 @@
FIXME("(%p %p %p) stub\n", pSubjectInfo, pcbIndirectData, pIndirectData);
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,
Modified: trunk/reactos/dll/win32/wintrust/softpub.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wintrust/softpub…
==============================================================================
--- trunk/reactos/dll/win32/wintrust/softpub.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wintrust/softpub.c [iso-8859-1] Sat Jan 31 23:42:03 2009
@@ -795,7 +795,7 @@
{
BOOL ret;
WTD_GENERIC_CHAIN_POLICY_DATA *policyData =
- (WTD_GENERIC_CHAIN_POLICY_DATA *)data->pWintrustData->pPolicyCallbackData;
+ data->pWintrustData->pPolicyCallbackData;
TRACE("(%p)\n", data);
@@ -961,7 +961,7 @@
{
HRESULT err = NO_ERROR; /* not a typo, MS confused the types */
WTD_GENERIC_CHAIN_POLICY_DATA *policyData =
- (WTD_GENERIC_CHAIN_POLICY_DATA *)data->pWintrustData->pPolicyCallbackData;
+ data->pWintrustData->pPolicyCallbackData;
TRACE("(%p)\n", data);
Modified: trunk/reactos/dll/win32/wintrust/wintrust.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wintrust/wintrus…
==============================================================================
--- trunk/reactos/dll/win32/wintrust/wintrust.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wintrust/wintrust.spec [iso-8859-1] Sat Jan 31 23:42:03 2009
@@ -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)
Modified: trunk/reactos/dll/win32/wintrust/wintrust_main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wintrust/wintrus…
==============================================================================
--- trunk/reactos/dll/win32/wintrust/wintrust_main.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wintrust/wintrust_main.c [iso-8859-1] Sat Jan 31 23:42:03
2009
@@ -184,7 +184,7 @@
goto error;
}
- data->hWVTStateData = (HANDLE)provData;
+ data->hWVTStateData = provData;
provData->pWintrustData = data;
if (hwnd == INVALID_HANDLE_VALUE)
provData->hWndParent = GetDesktopWindow();
@@ -215,7 +215,7 @@
WINTRUST_DATA *data)
{
DWORD err = ERROR_SUCCESS;
- CRYPT_PROVIDER_DATA *provData = (CRYPT_PROVIDER_DATA *)data->hWVTStateData;
+ CRYPT_PROVIDER_DATA *provData = data->hWVTStateData;
TRACE("(%p, %s, %p)\n", hwnd, debugstr_guid(actionID), data);
@@ -254,8 +254,7 @@
/* Undocumented: the published software action is passed a path,
* and pSIPClientData points to a WIN_TRUST_SUBJECT_FILE.
*/
- LPWIN_TRUST_SUBJECT_FILE subjectFile =
- (LPWIN_TRUST_SUBJECT_FILE)data->pSIPClientData;
+ LPWIN_TRUST_SUBJECT_FILE subjectFile = data->pSIPClientData;
WINTRUST_FILE_INFO fileInfo = { sizeof(fileInfo), 0 };
TRACE("subjectFile->hFile: %p\n", subjectFile->hFile);
@@ -377,7 +376,7 @@
/* Not sure why, but native skips the policy check */
provData->psPfns->pfnCertCheckPolicy = NULL;
- data->hWVTStateData = (HANDLE)provData;
+ data->hWVTStateData = provData;
provData->pWintrustData = data;
if (hwnd == INVALID_HANDLE_VALUE)
provData->hWndParent = GetDesktopWindow();
@@ -584,7 +583,7 @@
static const GUID generic_chain_verify = WINTRUST_ACTION_GENERIC_CHAIN_VERIFY;
static const GUID cert_action_verify = CERT_CERTIFICATE_ACTION_VERIFY;
LONG err = ERROR_SUCCESS;
- WINTRUST_DATA *actionData = (WINTRUST_DATA *)ActionData;
+ WINTRUST_DATA *actionData = ActionData;
TRACE("(%p, %s, %p)\n", hwnd, debugstr_guid(ActionID), ActionData);
dump_wintrust_data(ActionData);
@@ -709,7 +708,7 @@
CRYPT_PROVIDER_DATA * WINAPI WTHelperProvDataFromStateData(HANDLE hStateData)
{
TRACE("%p\n", hStateData);
- return (CRYPT_PROVIDER_DATA *)hStateData;
+ return hStateData;
}
/***********************************************************************
@@ -738,7 +737,7 @@
static BOOL WINAPI WINTRUST_enumUsages(PCCRYPT_OID_INFO pInfo, void *pvArg)
{
- PCCRYPT_OID_INFO **usages = (PCCRYPT_OID_INFO **)pvArg;
+ PCCRYPT_OID_INFO **usages = pvArg;
DWORD cUsages;
BOOL ret;
@@ -756,7 +755,7 @@
*/
for (cUsages = 0, ptr = *usages; *ptr; ptr++, cUsages++)
;
- *usages = WINTRUST_ReAlloc((CRYPT_OID_INFO *)*usages,
+ *usages = WINTRUST_ReAlloc(*usages,
(cUsages + 2) * sizeof(PCCRYPT_OID_INFO));
}
if (*usages)
@@ -809,7 +808,7 @@
}
else if (action == 2)
{
- WINTRUST_Free((CRYPT_OID_INFO *)*usages);
+ WINTRUST_Free(*usages);
*usages = NULL;
ret = TRUE;
}
Modified: trunk/reactos/include/psdk/mscat.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/mscat.h?rev=3…
==============================================================================
--- trunk/reactos/include/psdk/mscat.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/mscat.h [iso-8859-1] Sat Jan 31 23:42:03 2009
@@ -28,16 +28,46 @@
extern "C" {
#endif
+#define CRYPTCAT_OPEN_CREATENEW 0x00000001
+#define CRYPTCAT_OPEN_ALWAYS 0x00000002
+#define CRYPTCAT_OPEN_EXISTING 0x00000004
+#define CRYPTCAT_OPEN_EXCLUDE_PAGE_HASHES 0x00010000
+#define CRYPTCAT_OPEN_INCLUDE_PAGE_HASHES 0x00020000
+#define CRYPTCAT_OPEN_VERIFYSIGHASH 0x10000000
+#define CRYPTCAT_OPEN_NO_CONTENT_HCRYPTMSG 0x20000000
+#define CRYPTCAT_OPEN_SORTED 0x40000000
+#define CRYPTCAT_OPEN_FLAGS_MASK 0xffff0000
-#define CRYPTCAT_OPEN_CREATENEW 1
-#define CRYPTCAT_OPEN_ALWAYS 2
-#define CRYPTCAT_OPEN_EXISTING 4
+#define CRYPTCAT_E_AREA_HEADER 0x00000000
+#define CRYPTCAT_E_AREA_MEMBER 0x00010000
+#define CRYPTCAT_E_AREA_ATTRIBUTE 0x00020000
+#define CRYPTCAT_E_CDF_UNSUPPORTED 0x00000001
+#define CRYPTCAT_E_CDF_DUPLICATE 0x00000002
+#define CRYPTCAT_E_CDF_TAGNOTFOUND 0x00000004
+#define CRYPTCAT_E_CDF_MEMBER_FILE_PATH 0x00010001
+#define CRYPTCAT_E_CDF_MEMBER_INDIRECTDATA 0x00010002
+#define CRYPTCAT_E_CDF_MEMBER_FILENOTFOUND 0x00010004
+
+#define CRYPTCAT_E_CDF_BAD_GUID_CONV 0x00020001
+#define CRYPTCAT_E_CDF_ATTR_TOOFEWVALUES 0x00020002
+#define CRYPTCAT_E_CDF_ATTR_TYPECOMBO 0x00020004
#include <pshpack8.h>
-typedef struct CRYPTCATMEMBER_ {
+typedef struct CRYPTCATATTRIBUTE_
+{
+ DWORD cbStruct;
+ LPWSTR pwszReferenceTag;
+ DWORD dwAttrTypeAndAction;
+ DWORD cbValue;
+ BYTE *pbValue;
+ DWORD dwReserved;
+} CRYPTCATATTRIBUTE;
+
+typedef struct CRYPTCATMEMBER_
+{
DWORD cbStruct;
LPWSTR pwszReferenceTag;
LPWSTR pwszFileName;
@@ -51,24 +81,26 @@
CRYPT_ATTR_BLOB sEncodedMemberInfo;
} CRYPTCATMEMBER;
-typedef struct CRYPTCATATTRIBUTE_
-{
- DWORD cbStruct;
- LPWSTR pwszReferenceTag;
- DWORD dwAttrTypeAndAction;
- DWORD cbValue;
- BYTE *pbValue;
- DWORD dwReserved;
-}CRYPTCATATTRIBUTE;
-
-typedef struct CATALOG_INFO_
+typedef struct CATALOG_INFO_
{
DWORD cbStruct;
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 <poppack.h>
+
+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);
@@ -77,13 +109,23 @@
BOOL WINAPI CryptCATAdminReleaseCatalogContext(HCATADMIN,HCATINFO,DWORD);
BOOL WINAPI CryptCATAdminReleaseContext(HCATADMIN,DWORD);
BOOL WINAPI CryptCATAdminRemoveCatalog(HCATADMIN,LPCWSTR,DWORD);
-BOOL WINAPI CryptCATClose(HANDLE);
-BOOL WINAPI CryptCATCatalogInfoFromContext(HCATINFO,CATALOG_INFO*,DWORD);
-
-CRYPTCATMEMBER* WINAPI CryptCATEnumerateMember(HANDLE,CRYPTCATMEMBER*);
+BOOL WINAPI CryptCATAdminResolveCatalogPath(HCATADMIN, WCHAR *, CATALOG_INFO *,
DWORD);
+BOOL WINAPI CryptCATCatalogInfoFromContext(HCATINFO, CATALOG_INFO *, DWORD);
+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 *);
+CRYPTCATATTRIBUTE * WINAPI CryptCATGetAttrInfo(HANDLE, CRYPTCATMEMBER *, LPWSTR);
+CRYPTCATATTRIBUTE * WINAPI CryptCATGetCatAttrInfo(HANDLE, LPWSTR);
+CRYPTCATMEMBER * WINAPI CryptCATGetMemberInfo(HANDLE, LPWSTR);
HANDLE WINAPI CryptCATOpen(LPWSTR,DWORD,HCRYPTPROV,DWORD,DWORD);
-CRYPTCATATTRIBUTE* WINAPI CryptCATEnumerateAttr(HANDLE hCatalog,
CRYPTCATMEMBER*,CRYPTCATATTRIBUTE*);
-CRYPTCATATTRIBUTE* WINAPI CryptCATEnumerateCatAttr(HANDLE,CRYPTCATATTRIBUTE*);
#ifdef __cplusplus
}