2 * Copyright (C) 2004 Francois Gouget
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_MSCAT_H
20 #define __WINE_MSCAT_H
24 typedef HANDLE HCATADMIN;
25 typedef HANDLE HCATINFO;
31 #define CRYPTCAT_OPEN_CREATENEW 0x00000001
32 #define CRYPTCAT_OPEN_ALWAYS 0x00000002
33 #define CRYPTCAT_OPEN_EXISTING 0x00000004
34 #define CRYPTCAT_OPEN_EXCLUDE_PAGE_HASHES 0x00010000
35 #define CRYPTCAT_OPEN_INCLUDE_PAGE_HASHES 0x00020000
36 #define CRYPTCAT_OPEN_VERIFYSIGHASH 0x10000000
37 #define CRYPTCAT_OPEN_NO_CONTENT_HCRYPTMSG 0x20000000
38 #define CRYPTCAT_OPEN_SORTED 0x40000000
39 #define CRYPTCAT_OPEN_FLAGS_MASK 0xffff0000
41 #define CRYPTCAT_E_AREA_HEADER 0x00000000
42 #define CRYPTCAT_E_AREA_MEMBER 0x00010000
43 #define CRYPTCAT_E_AREA_ATTRIBUTE 0x00020000
45 #define CRYPTCAT_E_CDF_UNSUPPORTED 0x00000001
46 #define CRYPTCAT_E_CDF_DUPLICATE 0x00000002
47 #define CRYPTCAT_E_CDF_TAGNOTFOUND 0x00000004
49 #define CRYPTCAT_E_CDF_MEMBER_FILE_PATH 0x00010001
50 #define CRYPTCAT_E_CDF_MEMBER_INDIRECTDATA 0x00010002
51 #define CRYPTCAT_E_CDF_MEMBER_FILENOTFOUND 0x00010004
53 #define CRYPTCAT_E_CDF_BAD_GUID_CONV 0x00020001
54 #define CRYPTCAT_E_CDF_ATTR_TOOFEWVALUES 0x00020002
55 #define CRYPTCAT_E_CDF_ATTR_TYPECOMBO 0x00020004
59 typedef struct CRYPTCATATTRIBUTE_
62 LPWSTR pwszReferenceTag;
63 DWORD dwAttrTypeAndAction;
69 typedef struct CRYPTCATMEMBER_
72 LPWSTR pwszReferenceTag;
76 struct SIP_INDIRECT_DATA_* pIndirectData;
80 CRYPT_ATTR_BLOB sEncodedIndirectData;
81 CRYPT_ATTR_BLOB sEncodedMemberInfo;
84 typedef struct CATALOG_INFO_
87 WCHAR wszCatalogFile[MAX_PATH];
90 typedef struct CRYPTCATCDF_
95 DWORD dwLastMemberOffset;
103 typedef void (WINAPI *PFN_CDF_PARSE_ERROR_CALLBACK)(DWORD, DWORD, WCHAR *);
105 BOOL WINAPI CryptCATAdminAcquireContext(HCATADMIN*,const GUID*,DWORD);
106 HCATINFO WINAPI CryptCATAdminAddCatalog(HCATADMIN,PWSTR,PWSTR,DWORD);
107 BOOL WINAPI CryptCATAdminCalcHashFromFileHandle(HANDLE,DWORD*,BYTE*,DWORD);
108 HCATINFO WINAPI CryptCATAdminEnumCatalogFromHash(HCATADMIN,BYTE*,DWORD,DWORD,HCATINFO*);
109 BOOL WINAPI CryptCATAdminReleaseCatalogContext(HCATADMIN,HCATINFO,DWORD);
110 BOOL WINAPI CryptCATAdminReleaseContext(HCATADMIN,DWORD);
111 BOOL WINAPI CryptCATAdminRemoveCatalog(HCATADMIN,LPCWSTR,DWORD);
112 BOOL WINAPI CryptCATAdminResolveCatalogPath(HCATADMIN, WCHAR *, CATALOG_INFO *, DWORD);
113 BOOL WINAPI CryptCATCatalogInfoFromContext(HCATINFO, CATALOG_INFO *, DWORD);
114 BOOL WINAPI CryptCATCDFClose(CRYPTCATCDF *);
115 CRYPTCATATTRIBUTE * WINAPI CryptCATCDFEnumCatAttributes(CRYPTCATCDF *, CRYPTCATATTRIBUTE *,
116 PFN_CDF_PARSE_ERROR_CALLBACK);
117 LPWSTR WINAPI CryptCATCDFEnumMembersByCDFTagEx(CRYPTCATCDF *, LPWSTR,
118 PFN_CDF_PARSE_ERROR_CALLBACK,
119 CRYPTCATMEMBER **, BOOL, LPVOID);
120 CRYPTCATCDF * WINAPI CryptCATCDFOpen(LPWSTR, PFN_CDF_PARSE_ERROR_CALLBACK);
121 BOOL WINAPI CryptCATClose(HANDLE);
122 CRYPTCATATTRIBUTE * WINAPI CryptCATEnumerateAttr(HANDLE, CRYPTCATMEMBER *, CRYPTCATATTRIBUTE *);
123 CRYPTCATATTRIBUTE * WINAPI CryptCATEnumerateCatAttr(HANDLE, CRYPTCATATTRIBUTE *);
124 CRYPTCATMEMBER * WINAPI CryptCATEnumerateMember(HANDLE,CRYPTCATMEMBER *);
125 CRYPTCATATTRIBUTE * WINAPI CryptCATGetAttrInfo(HANDLE, CRYPTCATMEMBER *, LPWSTR);
126 CRYPTCATATTRIBUTE * WINAPI CryptCATGetCatAttrInfo(HANDLE, LPWSTR);
127 CRYPTCATMEMBER * WINAPI CryptCATGetMemberInfo(HANDLE, LPWSTR);
128 HANDLE WINAPI CryptCATOpen(LPWSTR,DWORD,HCRYPTPROV,DWORD,DWORD);