jscript: Added IActiveScriptParseProcedure2::ParseProcedureText implementation.
[wine.git] / include / cryptuiapi.h
blob3d027f5444e40f1dc44e6ace5e17cfc1f6be75d5
1 /*
2 * Copyright (C) 2008 Juan Lang
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
18 #ifndef __CRYPTUIAPI_H__
19 #define __CRYPTUIAPI_H__
21 #include <wintrust.h>
22 #include <wincrypt.h>
23 #include <prsht.h>
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
29 #include <pshpack8.h>
31 BOOL WINAPI CryptUIDlgViewContext(DWORD dwContextType, LPVOID pvContext,
32 HWND hwnd, LPCWSTR pwszTitle, DWORD dwFlags, LPVOID pvReserved);
34 /* Values for dwDontUseColumn */
35 #define CRYPTUI_SELECT_ISSUEDTO_COLUMN 0x00000001
36 #define CRYPTUI_SELECT_ISSUEDBY_COLUMN 0x00000002
37 #define CRYPTUI_SELECT_INTENDEDUSE_COLUMN 0x00000004
38 #define CRYPTUI_SELECT_FRIENDLYNAME_COLUMN 0x00000008
39 #define CRYPTUI_SELECT_LOCATION_COLUMN 0x00000010
40 #define CRYPTUI_SELECT_EXPIRATION_COLUMN 0x00000020
42 PCCERT_CONTEXT WINAPI CryptUIDlgSelectCertificateFromStore(
43 HCERTSTORE hCertStore, HWND hwnd, LPCWSTR pwszTitle, LPCWSTR pwszDisplayString,
44 DWORD dwDontUseColumn, DWORD dwFlags, LPVOID pvReserved);
46 /* Values for CRYPTUI_CERT_MGR_STRUCT's dwFlags */
47 #define CRYPTUI_CERT_MGR_PUBLISHER_TAB 0x00000004
48 #define CRYPTUI_CERT_MGR_TAB_MASK 0x0000000f
49 #define CRYPTUI_CERT_MGR_SINGLE_TAB_FLAG 0x00008000
51 typedef struct _CRYPTUI_CERT_MGR_STRUCT
53 DWORD dwSize;
54 HWND hwndParent;
55 DWORD dwFlags;
56 LPCWSTR pwszTitle;
57 LPCSTR pszInitUsageOID;
58 } CRYPTUI_CERT_MGR_STRUCT, *PCRYPTUI_CERT_MGR_STRUCT;
59 typedef const struct _CRYPTUI_CERT_MGR_STRUCT *PCCRYPTUI_CERT_MGR_STRUCT;
61 BOOL WINAPI CryptUIDlgCertMgr(PCCRYPTUI_CERT_MGR_STRUCT pCryptUICertMgr);
63 typedef BOOL (WINAPI *PFNCFILTERPROC)(PCCERT_CONTEXT pCertContext,
64 BOOL *pfInitialSelectedCert, void *pvCallbackData);
66 typedef struct tagCRYPTUI_INITDIALOG_STRUCT
68 LPARAM lParam;
69 PCCERT_CONTEXT pCertContext;
70 } CRYPTUI_INITDIALOG_STRUCT, *PCRYPTUI_INITDIALOG_STRUCT;
72 typedef struct tagCRYPTUI_VIEWCERTIFICATE_STRUCTA
74 DWORD dwSize;
75 HWND hwndParent;
76 DWORD dwFlags;
77 LPCSTR szTitle;
78 PCCERT_CONTEXT pCertContext;
79 LPCSTR *rgszPurposes;
80 DWORD cPurposes;
81 union {
82 CRYPT_PROVIDER_DATA const *pCryptProviderData;
83 HANDLE hWVTStateData;
84 } DUMMYUNIONNAME;
85 BOOL fpCryptProviderDataTrustedUsage;
86 DWORD idxSigner;
87 DWORD idxCert;
88 BOOL fCounterSigner;
89 DWORD idxCounterSigner;
90 DWORD cStores;
91 HCERTSTORE *rghStores;
92 DWORD cPropSheetPages;
93 LPCPROPSHEETPAGEA rgPropSheetPages;
94 DWORD nStartPage;
95 } CRYPTUI_VIEWCERTIFICATE_STRUCTA, *PCRYPTUI_VIEWCERTIFICATE_STRUCTA;
96 typedef const CRYPTUI_VIEWCERTIFICATE_STRUCTA *PCCRYPTUI_VIEWCERTIFICATE_STRUCTA;
98 typedef struct tagCRYPTUI_VIEWCERTIFICATE_STRUCTW
100 DWORD dwSize;
101 HWND hwndParent;
102 DWORD dwFlags;
103 LPCWSTR szTitle;
104 PCCERT_CONTEXT pCertContext;
105 LPCSTR *rgszPurposes;
106 DWORD cPurposes;
107 union {
108 CRYPT_PROVIDER_DATA const *pCryptProviderData;
109 HANDLE hWVTStateData;
110 } DUMMYUNIONNAME;
111 BOOL fpCryptProviderDataTrustedUsage;
112 DWORD idxSigner;
113 DWORD idxCert;
114 BOOL fCounterSigner;
115 DWORD idxCounterSigner;
116 DWORD cStores;
117 HCERTSTORE *rghStores;
118 DWORD cPropSheetPages;
119 LPCPROPSHEETPAGEW rgPropSheetPages;
120 DWORD nStartPage;
121 } CRYPTUI_VIEWCERTIFICATE_STRUCTW, *PCRYPTUI_VIEWCERTIFICATE_STRUCTW;
122 typedef const CRYPTUI_VIEWCERTIFICATE_STRUCTW *PCCRYPTUI_VIEWCERTIFICATE_STRUCTW;
124 #define CRYPTUI_VIEWCERTIFICATE_STRUCT WINELIB_NAME_AW(CRYPTUI_VIEWCERTIFICATE_STRUCT)
125 #define PCCRYPTUI_VIEWCERTIFICATE_STRUCT WINELIB_NAME_AW(PCCRYPTUI_VIEWCERTIFICATE_STRUCT)
127 BOOL WINAPI CryptUIDlgViewCertificateA(
128 PCCRYPTUI_VIEWCERTIFICATE_STRUCTA pCertViewInfo, BOOL *pfPropertiesChanged);
129 BOOL WINAPI CryptUIDlgViewCertificateW(
130 PCCRYPTUI_VIEWCERTIFICATE_STRUCTW pCertViewInfo, BOOL *pfPropertiesChanged);
131 #define CryptUIDlgViewCertificate WINELIB_NAME_AW(CryptUIDlgViewCertificate)
133 typedef struct _CRYPTUI_WIZ_DIGITAL_SIGN_BLOB_INFO
135 DWORD dwSize;
136 GUID *pGuidSubject;
137 DWORD cbBlob;
138 BYTE *pbBlob;
139 LPCWSTR pwszDisplayName;
140 } CRYPTUI_WIZ_DIGITAL_SIGN_BLOB_INFO, *PCRYPTUI_WIZ_DIGITAL_SIGN_BLOB_INFO;
141 typedef const CRYPTUI_WIZ_DIGITAL_SIGN_BLOB_INFO *
142 PCCRYPTUI_WIZ_DIGITAL_SIGN_BLOB_INFO;
144 typedef struct _CRYPTUI_WIZ_DIGITAL_SIGN_STORE_INFO
146 DWORD dwSize;
147 DWORD cCertStore;
148 HCERTSTORE *rghCertStore;
149 PFNCFILTERPROC pFilterCallback;
150 void *pvCallbackData;
151 } CRYPTUI_WIZ_DIGITAL_SIGN_STORE_INFO, *PCRYPTUI_WIZ_DIGITAL_SIGN_STORE_INFO;
152 typedef const CRYPTUI_WIZ_DIGITAL_SIGN_STORE_INFO *
153 PCCRYPTUI_WIZ_DIGITAL_SIGN_STORE_INFO;
155 typedef struct _CRYPTUI_WIZ_DIGITAL_SIGN_PVK_FILE_INFO
157 DWORD dwSize;
158 LPWSTR pwszPvkFileName;
159 LPWSTR pwszProvName;
160 DWORD dwProvType;
161 } CRYPTUI_WIZ_DIGITAL_SIGN_PVK_FILE_INFO,
162 *PCRYPTUI_WIZ_DIGITAL_SIGN_PVK_FILE_INFO;
163 typedef const CRYPTUI_WIZ_DIGITAL_SIGN_PVK_FILE_INFO *
164 PCCRYPTUI_WIZ_DIGITAL_SIGN_PVK_FILE_INFO;
166 typedef struct _CRYPTUI_WIZ_DIGITAL_SIGN_CERT_PVK_INFO
168 DWORD dwSize;
169 LPWSTR pwszSigningCertFileName;
170 DWORD dwPvkChoice;
171 union {
172 PCCRYPTUI_WIZ_DIGITAL_SIGN_PVK_FILE_INFO pPvkFileInfo;
173 PCRYPT_KEY_PROV_INFO pPvkProvInfo;
174 } DUMMYUNIONNAME;
175 } CRYPTUI_WIZ_DIGITAL_SIGN_CERT_PVK_INFO,
176 *PCRYPTUI_WIZ_DIGITAL_SIGN_CERT_PVK_INFO;
177 typedef const CRYPTUI_WIZ_DIGITAL_SIGN_CERT_PVK_INFO *
178 PCCRYPTUI_WIZ_DIGITAL_SIGN_CERT_PVK_INFO;
180 typedef struct _CRYPTUI_WIZ_DIGITAL_SIGN_EXTENDED_INFO
182 DWORD dwSize;
183 DWORD dwAttrFlags;
184 LPCWSTR pwszDescription;
185 LPCWSTR pwszMoreInfoLocation;
186 LPCSTR pszHashAlg;
187 LPCWSTR pwszSigningCertDisplayString;
188 HCERTSTORE hAdditionalCertStore;
189 PCRYPT_ATTRIBUTES psAuthenticated;
190 PCRYPT_ATTRIBUTES psUnauthenticated;
191 } CRYPTUI_WIZ_DIGITAL_SIGN_EXTENDED_INFO,
192 *PCRYPTUI_WIZ_DIGITAL_SIGN_EXTENDED_INFO;
193 typedef const CRYPTUI_WIZ_DIGITAL_SIGN_EXTENDED_INFO *
194 PCCRYPTUI_WIZ_DIGITAL_SIGN_EXTENDED_INFO;
196 typedef struct _CRYPTUI_WIZ_DIGITAL_SIGN_INFO
198 DWORD dwSize;
199 DWORD dwSubjectChoice;
200 union {
201 LPCWSTR pwszFileName;
202 PCCRYPTUI_WIZ_DIGITAL_SIGN_BLOB_INFO pSignBlobInfo;
203 } DUMMYUNIONNAME1;
204 DWORD dwSigningCertChoice;
205 union {
206 PCCERT_CONTEXT pSigningCertContext;
207 PCCRYPTUI_WIZ_DIGITAL_SIGN_STORE_INFO pSigningCertStore;
208 PCCRYPTUI_WIZ_DIGITAL_SIGN_CERT_PVK_INFO pSigningCertPvkInfo;
209 } DUMMYUNIONNAME2;
210 LPCWSTR pwszTimestampURL;
211 DWORD dwAdditionalCertChoice;
212 PCCRYPTUI_WIZ_DIGITAL_SIGN_EXTENDED_INFO pSignExtInfo;
213 } CRYPTUI_WIZ_DIGITAL_SIGN_INFO, *PCRYPTUI_WIZ_DIGITAL_SIGN_INFO;
214 typedef const CRYPTUI_WIZ_DIGITAL_SIGN_INFO *PCCRYPTUI_WIZ_DIGITAL_SIGN_INFO;
216 typedef struct _CRYPTUI_WIZ_DIGITAL_SIGN_CONTEXT
218 DWORD dwSize;
219 DWORD cbBlob;
220 BYTE *pbBlob;
221 } CRYPTUI_WIZ_DIGITAL_SIGN_CONTEXT, *PCRYPTUI_WIZ_DIGITAL_SIGN_CONTEXT;
223 /* Values for CryptUIWizDigitalSign's dwFlags */
224 #define CRYPTUI_WIZ_NO_UI 0x00000001
225 #define CRYPTUI_WIZ_DIGITAL_SIGN_EXCLUDE_PAGE_HASHES 0x00000002
226 #define CRYPTUI_WIZ_DIGITAL_SIGN_INCLUDE_PAGE_HASHES 0x00000004
228 BOOL WINAPI CryptUIWizDigitalSign(DWORD dwFlags, HWND hwndParent,
229 LPCWSTR pwszWizardTitle, PCCRYPTUI_WIZ_DIGITAL_SIGN_INFO pDigitalSignInfo,
230 PCRYPTUI_WIZ_DIGITAL_SIGN_CONTEXT *ppSignContext);
232 BOOL WINAPI CryptUIWizFreeDigitalSignContext(
233 PCRYPTUI_WIZ_DIGITAL_SIGN_CONTEXT pSignContext);
235 /* Values for CRYPTUI_WIZ_EXPORT_INFO's dwSubjectChoice */
236 #define CRYPTUI_WIZ_EXPORT_CERT_CONTEXT 1
237 #define CRYPTUI_WIZ_EXPORT_CTL_CONTEXT 2
238 #define CRYPTUI_WIZ_EXPORT_CRL_CONTEXT 3
239 #define CRYPTUI_WIZ_EXPORT_CERT_STORE 4
240 #define CRYPTUI_WIZ_EXPORT_CERT_STORE_CERTIFICATES_ONLY 5
241 #define CRYPTUI_WIZ_EXPORT_FORMAT_CRL 6
242 #define CRYPTUI_WIZ_EXPORT_FORMAT_CTL 7
244 typedef struct _CRYPTUI_WIZ_EXPORT_INFO
246 DWORD dwSize;
247 LPCWSTR pwszExportFileName;
248 DWORD dwSubjectChoice;
249 union {
250 PCCERT_CONTEXT pCertContext;
251 PCCTL_CONTEXT pCTLContext;
252 PCCRL_CONTEXT pCRLContext;
253 } DUMMYUNIONNAME;
254 DWORD cStores;
255 HCERTSTORE *rghStores;
256 } CRYPTUI_WIZ_EXPORT_INFO, *PCRYPTUI_WIZ_EXPORT_INFO;
257 typedef const CRYPTUI_WIZ_EXPORT_INFO *PCCRYPTUI_WIZ_EXPORT_INFO;
259 /* Values for CRYPTUI_WIZ_EXPORT_CERTCONTEXT_INFO's dwExportFormat */
260 #define CRYPTUI_WIZ_EXPORT_FORMAT_DER 1
261 #define CRYPTUI_WIZ_EXPORT_FORMAT_PFX 2
262 #define CRYPTUI_WIZ_EXPORT_FORMAT_PKCS7 3
263 #define CRYPTUI_WIZ_EXPORT_FORMAT_BASE64 4
264 #define CRYPTUI_WIZ_EXPORT_FORMAT_SERIALIZED_CERT_STORE 5
266 typedef struct _CRYPTUI_WIZ_EXPORT_CERTCONTEXT_INFO
268 DWORD dwSize;
269 DWORD dwExportFormat;
270 BOOL fExportChain;
271 BOOL fExportPrivateKeys;
272 LPCWSTR pwszPassword;
273 BOOL fStrongEncryption;
274 } CRYPTUI_WIZ_EXPORT_CERTCONTEXT_INFO, *PCRYPTUI_WIZ_EXPORT_CERTCONTEXT_INFO;
275 typedef const CRYPTUI_WIZ_EXPORT_CERTCONTEXT_INFO *
276 PCCRYPTUI_WIZ_EXPORT_CERTCONTEXT_INFO;
278 BOOL WINAPI CryptUIWizExport(DWORD dwFlags, HWND hwndParent,
279 LPCWSTR pwszWizardTitle, PCCRYPTUI_WIZ_EXPORT_INFO pExportInfo, void *pvoid);
281 /* Values for CRYPTUI_WIZ_IMPORT_SRC_INFO's dwSubjectChoice */
282 #define CRYPTUI_WIZ_IMPORT_SUBJECT_FILE 1
283 #define CRYPTUI_WIZ_IMPORT_SUBJECT_CERT_CONTEXT 2
284 #define CRYPTUI_WIZ_IMPORT_SUBJECT_CTL_CONTEXT 3
285 #define CRYPTUI_WIZ_IMPORT_SUBJECT_CRL_CONTEXT 4
286 #define CRYPTUI_WIZ_IMPORT_SUBJECT_CERT_STORE 5
288 typedef struct _CRYPTUI_WIZ_IMPORT_SUBJECT_INFO
290 DWORD dwSize;
291 DWORD dwSubjectChoice;
292 union {
293 LPCWSTR pwszFileName;
294 PCCERT_CONTEXT pCertContext;
295 PCCTL_CONTEXT pCTLContext;
296 PCCRL_CONTEXT pCRLContext;
297 HCERTSTORE hCertStore;
298 } DUMMYUNIONNAME;
299 DWORD dwFlags;
300 LPCWSTR pwszPassword;
301 } CRYPTUI_WIZ_IMPORT_SRC_INFO, *PCRYPTUI_WIZ_IMPORT_SRC_INFO;
302 typedef const CRYPTUI_WIZ_IMPORT_SRC_INFO *PCCRYPTUI_WIZ_IMPORT_SRC_INFO;
304 /* Values for CryptUIWizImport's dwFlags */
305 #define CRYPTUI_WIZ_IMPORT_NO_CHANGE_DEST_STORE 0x00010000
306 #define CRYPTUI_WIZ_IMPORT_ALLOW_CERT 0x00020000
307 #define CRYPTUI_WIZ_IMPORT_ALLOW_CRL 0x00040000
308 #define CRYPTUI_WIZ_IMPORT_ALLOW_CTL 0x00080000
309 #define CRYPTUI_WIZ_IMPORT_TO_LOCALMACHINE 0x00100000
310 #define CRYPTUI_WIZ_IMPORT_TO_CURRENTUSER 0x00200000
311 #define CRYPTUI_WIZ_IMPORT_REMOTE_DEST_STORE 0x00400000
313 BOOL WINAPI CryptUIWizImport(DWORD dwFlags, HWND hwndParent,
314 LPCWSTR pwszWizardTitle, PCCRYPTUI_WIZ_IMPORT_SRC_INFO pImportSrc,
315 HCERTSTORE hDestCertStore);
317 #include <poppack.h>
319 #ifdef __cplusplus
321 #endif
323 #endif