source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/mscat.h@ 1167

Last change on this file since 1167 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 6.1 KB
Line 
1/*
2 * Copyright (C) 2004 Francois Gouget
3 *
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.
8 *
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.
13 *
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
17 */
18
19#ifndef __WINE_MSCAT_H
20#define __WINE_MSCAT_H
21
22#include <mssip.h>
23
24typedef HANDLE HCATADMIN;
25typedef HANDLE HCATINFO;
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31#define CRYPTCAT_ATTR_NAMEASCII 0x00000001
32#define CRYPTCAT_ATTR_NAMEOBJID 0x00000002
33#define CRYPTCAT_ATTR_DATAASCII 0x00010000
34#define CRYPTCAT_ATTR_DATAOBJID 0x00020000
35#define CRYPTCAT_ATTR_DATAREPLACE 0x00040000
36#define CRYPTCAT_ATTR_NO_AUTO_COMPAT_ENTRY 0x01000000
37#define CRYPTCAT_ATTR_AUTHENTICATED 0x10000000
38#define CRYPTCAT_ATTR_UNAUTHENTICATED 0x20000000
39
40#define CRYPTCAT_OPEN_CREATENEW 0x00000001
41#define CRYPTCAT_OPEN_ALWAYS 0x00000002
42#define CRYPTCAT_OPEN_EXISTING 0x00000004
43#define CRYPTCAT_OPEN_EXCLUDE_PAGE_HASHES 0x00010000
44#define CRYPTCAT_OPEN_INCLUDE_PAGE_HASHES 0x00020000
45#define CRYPTCAT_OPEN_VERIFYSIGHASH 0x10000000
46#define CRYPTCAT_OPEN_NO_CONTENT_HCRYPTMSG 0x20000000
47#define CRYPTCAT_OPEN_SORTED 0x40000000
48#define CRYPTCAT_OPEN_FLAGS_MASK 0xffff0000
49
50#define CRYPTCAT_E_AREA_HEADER 0x00000000
51#define CRYPTCAT_E_AREA_MEMBER 0x00010000
52#define CRYPTCAT_E_AREA_ATTRIBUTE 0x00020000
53
54#define CRYPTCAT_E_CDF_UNSUPPORTED 0x00000001
55#define CRYPTCAT_E_CDF_DUPLICATE 0x00000002
56#define CRYPTCAT_E_CDF_TAGNOTFOUND 0x00000004
57
58#define CRYPTCAT_E_CDF_MEMBER_FILE_PATH 0x00010001
59#define CRYPTCAT_E_CDF_MEMBER_INDIRECTDATA 0x00010002
60#define CRYPTCAT_E_CDF_MEMBER_FILENOTFOUND 0x00010004
61
62#define CRYPTCAT_E_CDF_BAD_GUID_CONV 0x00020001
63#define CRYPTCAT_E_CDF_ATTR_TOOFEWVALUES 0x00020002
64#define CRYPTCAT_E_CDF_ATTR_TYPECOMBO 0x00020004
65
66#define CRYPTCAT_VERSION_1 0x100
67#define CRYPTCAT_VERSION_2 0x200
68
69#include <pshpack8.h>
70
71typedef struct CRYPTCATATTRIBUTE_
72{
73 DWORD cbStruct;
74 LPWSTR pwszReferenceTag;
75 DWORD dwAttrTypeAndAction;
76 DWORD cbValue;
77 BYTE *pbValue;
78 DWORD dwReserved;
79} CRYPTCATATTRIBUTE;
80
81typedef struct CRYPTCATMEMBER_
82{
83 DWORD cbStruct;
84 LPWSTR pwszReferenceTag;
85 LPWSTR pwszFileName;
86 GUID gSubjectType;
87 DWORD fdwMemberFlags;
88 struct SIP_INDIRECT_DATA_* pIndirectData;
89 DWORD dwCertVersion;
90 DWORD dwReserved;
91 HANDLE hReserved;
92 CRYPT_ATTR_BLOB sEncodedIndirectData;
93 CRYPT_ATTR_BLOB sEncodedMemberInfo;
94} CRYPTCATMEMBER;
95
96typedef struct CATALOG_INFO_
97{
98 DWORD cbStruct;
99 WCHAR wszCatalogFile[MAX_PATH];
100} CATALOG_INFO;
101
102typedef struct CRYPTCATCDF_
103{
104 DWORD cbStruct;
105 HANDLE hFile;
106 DWORD dwCurFilePos;
107 DWORD dwLastMemberOffset;
108 WINBOOL fEOF;
109 LPWSTR pwszResultDir;
110 HANDLE hCATStore;
111} CRYPTCATCDF;
112
113#include <poppack.h>
114
115typedef void (WINAPI *PFN_CDF_PARSE_ERROR_CALLBACK)(DWORD, DWORD, WCHAR *);
116
117WINBOOL WINAPI CryptCATAdminAcquireContext(HCATADMIN*,const GUID*,DWORD);
118WINBOOL WINAPI CryptCATAdminAcquireContext2(HCATADMIN*,const GUID*,const WCHAR*,const CERT_STRONG_SIGN_PARA*,DWORD);
119HCATINFO WINAPI CryptCATAdminAddCatalog(HCATADMIN,PWSTR,PWSTR,DWORD);
120WINBOOL WINAPI CryptCATAdminCalcHashFromFileHandle(HANDLE,DWORD*,BYTE*,DWORD);
121WINBOOL WINAPI CryptCATAdminCalcHashFromFileHandle2(HCATADMIN,HANDLE,DWORD*,BYTE*,DWORD);
122HCATINFO WINAPI CryptCATAdminEnumCatalogFromHash(HCATADMIN,BYTE*,DWORD,DWORD,HCATINFO*);
123WINBOOL WINAPI CryptCATAdminReleaseCatalogContext(HCATADMIN,HCATINFO,DWORD);
124WINBOOL WINAPI CryptCATAdminReleaseContext(HCATADMIN,DWORD);
125WINBOOL WINAPI CryptCATAdminRemoveCatalog(HCATADMIN,LPCWSTR,DWORD);
126WINBOOL WINAPI CryptCATAdminResolveCatalogPath(HCATADMIN, WCHAR *, CATALOG_INFO *, DWORD);
127WINBOOL WINAPI CryptCATCatalogInfoFromContext(HCATINFO, CATALOG_INFO *, DWORD);
128WINBOOL WINAPI CryptCATCDFClose(CRYPTCATCDF *);
129CRYPTCATATTRIBUTE * WINAPI CryptCATCDFEnumCatAttributes(CRYPTCATCDF *, CRYPTCATATTRIBUTE *,
130 PFN_CDF_PARSE_ERROR_CALLBACK);
131LPWSTR WINAPI CryptCATCDFEnumMembersByCDFTagEx(CRYPTCATCDF *, LPWSTR,
132 PFN_CDF_PARSE_ERROR_CALLBACK,
133 CRYPTCATMEMBER **, WINBOOL, LPVOID);
134CRYPTCATCDF * WINAPI CryptCATCDFOpen(LPWSTR, PFN_CDF_PARSE_ERROR_CALLBACK);
135WINBOOL WINAPI CryptCATClose(HANDLE);
136CRYPTCATATTRIBUTE * WINAPI CryptCATEnumerateAttr(HANDLE, CRYPTCATMEMBER *, CRYPTCATATTRIBUTE *);
137CRYPTCATATTRIBUTE * WINAPI CryptCATEnumerateCatAttr(HANDLE, CRYPTCATATTRIBUTE *);
138CRYPTCATMEMBER * WINAPI CryptCATEnumerateMember(HANDLE,CRYPTCATMEMBER *);
139CRYPTCATATTRIBUTE * WINAPI CryptCATGetAttrInfo(HANDLE, CRYPTCATMEMBER *, LPWSTR);
140CRYPTCATATTRIBUTE * WINAPI CryptCATGetCatAttrInfo(HANDLE, LPWSTR);
141CRYPTCATMEMBER * WINAPI CryptCATGetMemberInfo(HANDLE, LPWSTR);
142HANDLE WINAPI CryptCATOpen(LPWSTR,DWORD,HCRYPTPROV,DWORD,DWORD);
143WINBOOL WINAPI CryptCATPersistStore(HANDLE catalog);
144CRYPTCATATTRIBUTE * WINAPI CryptCATPutAttrInfo(HANDLE catalog, CRYPTCATMEMBER *member, WCHAR *name, DWORD flags, DWORD size, BYTE *data);
145CRYPTCATATTRIBUTE * WINAPI CryptCATPutCatAttrInfo(HANDLE catalog, WCHAR *name, DWORD flags, DWORD size, BYTE *data);
146CRYPTCATMEMBER * WINAPI CryptCATPutMemberInfo(HANDLE catalog, WCHAR *filename, WCHAR *member, GUID *subject, DWORD version, DWORD size, BYTE *data);
147
148#ifdef __cplusplus
149}
150#endif
151
152#endif
Note: See TracBrowser for help on using the repository browser.