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
57 #define CRYPTCAT_VERSION_1 0x100
58 #define CRYPTCAT_VERSION_2 0x200
62 typedef struct CRYPTCATATTRIBUTE_
65 LPWSTR pwszReferenceTag
;
66 DWORD dwAttrTypeAndAction
;
72 typedef struct CRYPTCATMEMBER_
75 LPWSTR pwszReferenceTag
;
79 struct SIP_INDIRECT_DATA_
* pIndirectData
;
83 CRYPT_ATTR_BLOB sEncodedIndirectData
;
84 CRYPT_ATTR_BLOB sEncodedMemberInfo
;
87 typedef struct CATALOG_INFO_
90 WCHAR wszCatalogFile
[MAX_PATH
];
93 typedef struct CRYPTCATCDF_
98 DWORD dwLastMemberOffset
;
100 LPWSTR pwszResultDir
;
106 typedef void (WINAPI
*PFN_CDF_PARSE_ERROR_CALLBACK
)(DWORD
, DWORD
, WCHAR
*);
108 BOOL WINAPI
CryptCATAdminAcquireContext(HCATADMIN
*,const GUID
*,DWORD
);
109 BOOL WINAPI
CryptCATAdminAcquireContext2(HCATADMIN
*,const GUID
*,const WCHAR
*,const CERT_STRONG_SIGN_PARA
*,DWORD
);
110 HCATINFO WINAPI
CryptCATAdminAddCatalog(HCATADMIN
,PWSTR
,PWSTR
,DWORD
);
111 BOOL WINAPI
CryptCATAdminCalcHashFromFileHandle(HANDLE
,DWORD
*,BYTE
*,DWORD
);
112 BOOL WINAPI
CryptCATAdminCalcHashFromFileHandle2(HCATADMIN
,HANDLE
,DWORD
*,BYTE
*,DWORD
);
113 HCATINFO WINAPI
CryptCATAdminEnumCatalogFromHash(HCATADMIN
,BYTE
*,DWORD
,DWORD
,HCATINFO
*);
114 BOOL WINAPI
CryptCATAdminReleaseCatalogContext(HCATADMIN
,HCATINFO
,DWORD
);
115 BOOL WINAPI
CryptCATAdminReleaseContext(HCATADMIN
,DWORD
);
116 BOOL WINAPI
CryptCATAdminRemoveCatalog(HCATADMIN
,LPCWSTR
,DWORD
);
117 BOOL WINAPI
CryptCATAdminResolveCatalogPath(HCATADMIN
, WCHAR
*, CATALOG_INFO
*, DWORD
);
118 BOOL WINAPI
CryptCATCatalogInfoFromContext(HCATINFO
, CATALOG_INFO
*, DWORD
);
119 BOOL WINAPI
CryptCATCDFClose(CRYPTCATCDF
*);
120 CRYPTCATATTRIBUTE
* WINAPI
CryptCATCDFEnumCatAttributes(CRYPTCATCDF
*, CRYPTCATATTRIBUTE
*,
121 PFN_CDF_PARSE_ERROR_CALLBACK
);
122 LPWSTR WINAPI
CryptCATCDFEnumMembersByCDFTagEx(CRYPTCATCDF
*, LPWSTR
,
123 PFN_CDF_PARSE_ERROR_CALLBACK
,
124 CRYPTCATMEMBER
**, BOOL
, LPVOID
);
125 CRYPTCATCDF
* WINAPI
CryptCATCDFOpen(LPWSTR
, PFN_CDF_PARSE_ERROR_CALLBACK
);
126 BOOL WINAPI
CryptCATClose(HANDLE
);
127 CRYPTCATATTRIBUTE
* WINAPI
CryptCATEnumerateAttr(HANDLE
, CRYPTCATMEMBER
*, CRYPTCATATTRIBUTE
*);
128 CRYPTCATATTRIBUTE
* WINAPI
CryptCATEnumerateCatAttr(HANDLE
, CRYPTCATATTRIBUTE
*);
129 CRYPTCATMEMBER
* WINAPI
CryptCATEnumerateMember(HANDLE
,CRYPTCATMEMBER
*);
130 CRYPTCATATTRIBUTE
* WINAPI
CryptCATGetAttrInfo(HANDLE
, CRYPTCATMEMBER
*, LPWSTR
);
131 CRYPTCATATTRIBUTE
* WINAPI
CryptCATGetCatAttrInfo(HANDLE
, LPWSTR
);
132 CRYPTCATMEMBER
* WINAPI
CryptCATGetMemberInfo(HANDLE
, LPWSTR
);
133 HANDLE WINAPI
CryptCATOpen(LPWSTR
,DWORD
,HCRYPTPROV
,DWORD
,DWORD
);