widl: Always check the runtimeclass interfaces presence.
[wine/zf.git] / include / mssip.h
blobd002f9612332e827d85cef26c3c6c6ac404ad757
1 /*
2 * Copyright (C) 2002 Patrik Stridvall
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_MSSIP_H
20 #define __WINE_MSSIP_H
22 #ifdef __cplusplus
23 extern "C" {
24 #endif /* defined(__cplusplus) */
26 /**********************************************************************/
28 typedef CRYPT_HASH_BLOB CRYPT_DIGEST_DATA;
30 /**********************************************************************/
32 #define MSSIP_FLAGS_PROHIBIT_RESIZE_ON_CREATE 0x00010000
33 #define MSSIP_FLAGS_USE_CATALOG 0x00020000
35 #define SPC_EXC_PE_PAGE_HASHES_FLAG 0x010
36 #define SPC_INC_PE_IMPORT_ADDR_TABLE_FLAG 0x020
37 #define SPC_INC_PE_DEBUG_INFO_FLAG 0x040
38 #define SPC_INC_PE_RESOURCES_FLAG 0x080
39 #define SPC_INC_PE_PAGE_HASHES_FLAG 0x100
41 #define MSSIP_ADDINFO_NONE 0
42 #define MSSIP_ADDINFO_FLAT 1
43 #define MSSIP_ADDINFO_CATMEMBER 2
44 #define MSSIP_ADDINFO_BLOB 3
45 #define MSSIP_ADDINFO_NONMSSIP 500
47 #define SIP_MAX_MAGIC_NUMBER 4
49 /**********************************************************************/
51 #include <pshpack8.h>
52 typedef struct SIP_SUBJECTINFO_ {
53 DWORD cbSize;
54 GUID *pgSubjectType;
55 HANDLE hFile;
56 LPCWSTR pwsFileName;
57 LPCWSTR pwsDisplayName;
59 DWORD dwReserved1;
60 DWORD dwIntVersion;
62 HCRYPTPROV hProv;
63 CRYPT_ALGORITHM_IDENTIFIER DigestAlgorithm;
64 DWORD dwFlags;
65 DWORD dwEncodingType;
66 DWORD dwReserved2;
67 DWORD fdwCAPISettings;
68 DWORD fdwSecuritySettings;
69 DWORD dwIndex;
71 DWORD dwUnionChoice;
72 union {
73 struct MS_ADDINFO_FLAT_ *psFlat;
74 struct MS_ADDINFO_CATALOGMEMBER_ *psCatMember;
75 struct MS_ADDINFO_BLOB_ *psBlob;
76 } DUMMYUNIONNAME;
78 LPVOID pClientData;
79 } SIP_SUBJECTINFO, *LPSIP_SUBJECTINFO;
80 #include <poppack.h>
82 #include <pshpack8.h>
83 typedef struct MS_ADDINFO_FLAT_ {
84 DWORD cbStruct;
86 struct SIP_INDIRECT_DATA_ *pIndirectData;
87 } MS_ADDINFO_FLAT, *PMS_ADDINFO_FLAT;
88 #include <poppack.h>
90 #include <pshpack8.h>
91 typedef struct MS_ADDINFO_CATALOGMEMBER_ {
92 DWORD cbStruct;
94 struct CRYPTCATSTORE_ *pStore;
95 struct CRYPTCATMEMBER_ *pMember;
96 } MS_ADDINFO_CATALOGMEMBER, *PMS_ADDINFO_CATALOGMEMBER;
97 #include <poppack.h>
99 #include <pshpack8.h>
100 typedef struct MS_ADDINFO_BLOB_ {
101 DWORD cbStruct;
103 DWORD cbMemObject;
104 BYTE *pbMemObject;
106 DWORD cbMemSignedMsg;
107 BYTE *pbMemSignedMsg;
108 } MS_ADDINFO_BLOB, *PMS_ADDINFO_BLOB;
109 #include <poppack.h>
111 #include <pshpack8.h>
112 typedef struct SIP_INDIRECT_DATA_ {
113 CRYPT_ATTRIBUTE_TYPE_VALUE Data;
114 CRYPT_ALGORITHM_IDENTIFIER DigestAlgorithm;
115 CRYPT_HASH_BLOB Digest;
116 } SIP_INDIRECT_DATA, *PSIP_INDIRECT_DATA;
117 #include <poppack.h>
119 typedef BOOL (WINAPI * pCryptSIPGetSignedDataMsg)(SIP_SUBJECTINFO *,DWORD *,DWORD,DWORD *,BYTE *);
120 typedef BOOL (WINAPI * pCryptSIPPutSignedDataMsg)(SIP_SUBJECTINFO *,DWORD,DWORD *,DWORD,BYTE *);
121 typedef BOOL (WINAPI * pCryptSIPCreateIndirectData)(SIP_SUBJECTINFO *,DWORD *,SIP_INDIRECT_DATA *);
122 typedef BOOL (WINAPI * pCryptSIPVerifyIndirectData)(SIP_SUBJECTINFO *,SIP_INDIRECT_DATA *);
123 typedef BOOL (WINAPI * pCryptSIPRemoveSignedDataMsg)(SIP_SUBJECTINFO *,DWORD);
125 #include <pshpack8.h>
126 typedef struct SIP_DISPATCH_INFO_ {
127 DWORD cbSize;
129 HANDLE hSIP;
131 pCryptSIPGetSignedDataMsg pfGet;
132 pCryptSIPPutSignedDataMsg pfPut;
133 pCryptSIPCreateIndirectData pfCreate;
134 pCryptSIPVerifyIndirectData pfVerify;
135 pCryptSIPRemoveSignedDataMsg pfRemove;
136 } SIP_DISPATCH_INFO, *LPSIP_DISPATCH_INFO;
137 #include <poppack.h>
139 typedef BOOL (WINAPI *pfnIsFileSupported)(HANDLE,GUID *);
140 typedef BOOL (WINAPI *pfnIsFileSupportedName)(WCHAR *,GUID *);
142 #include <pshpack8.h>
143 typedef struct SIP_ADD_NEWPROVIDER_
145 DWORD cbStruct;
147 GUID *pgSubject;
149 WCHAR *pwszDLLFileName;
150 WCHAR *pwszMagicNumber;
152 WCHAR *pwszIsFunctionName;
154 WCHAR *pwszGetFuncName;
155 WCHAR *pwszPutFuncName;
156 WCHAR *pwszCreateFuncName;
157 WCHAR *pwszVerifyFuncName;
158 WCHAR *pwszRemoveFuncName;
160 WCHAR *pwszIsFunctionNameFmt2;
162 WCHAR *pwszGetCapFuncName;
163 } SIP_ADD_NEWPROVIDER, *PSIP_ADD_NEWPROVIDER;
164 #include <poppack.h>
166 /**********************************************************************/
168 BOOL WINAPI CryptSIPGetSignedDataMsg(SIP_SUBJECTINFO *,DWORD *,DWORD,DWORD *,BYTE *);
169 BOOL WINAPI CryptSIPPutSignedDataMsg(SIP_SUBJECTINFO *,DWORD,DWORD *,DWORD,BYTE *);
170 BOOL WINAPI CryptSIPCreateIndirectData(SIP_SUBJECTINFO *,DWORD *,SIP_INDIRECT_DATA *);
171 BOOL WINAPI CryptSIPVerifyIndirectData(SIP_SUBJECTINFO *,SIP_INDIRECT_DATA *);
172 BOOL WINAPI CryptSIPRemoveSignedDataMsg(SIP_SUBJECTINFO *,DWORD);
174 BOOL WINAPI CryptSIPLoad(const GUID *,DWORD,SIP_DISPATCH_INFO *);
175 BOOL WINAPI CryptSIPRetrieveSubjectGuid(LPCWSTR,HANDLE,GUID *);
176 BOOL WINAPI CryptSIPRetrieveSubjectGuidForCatalogFile(LPCWSTR,HANDLE,GUID *);
177 BOOL WINAPI CryptSIPAddProvider(SIP_ADD_NEWPROVIDER *);
178 BOOL WINAPI CryptSIPRemoveProvider(GUID *);
180 #ifdef __cplusplus
181 } /* extern "C" */
182 #endif /* defined(__cplusplus) */
184 #endif /* __WINE_MSSIP_H */