ReactOS  0.4.15-dev-1397-g19779b3
cryptdlg.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008 Juan Lang
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 #ifndef __CRYPTDLG_H__
19 #define __CRYPTDLG_H__
20 
21 #include <prsht.h>
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 #define CRYPTDLG_FLAGS_MASK 0xff000000
28 #define CRYPTDLG_REVOCATION_DEFAULT 0x00000000
29 #define CRYPTDLG_REVOCATION_ONLINE 0x80000000
30 #define CRYPTDLG_REVOCATION_CACHE 0x40000000
31 #define CRYPTDLG_REVOCATION_NONE 0x20000000
32 
33 #define CRYPTDLG_POLICY_MASK 0x0000ffff
34 #define POLICY_IGNORE_NON_CRITICAL_BC 0x00000001
35 
36 #define CRYPTDLG_ACTION_MASK 0xffff0000
37 #define ACTION_REVOCATION_DEFAULT_ONLINE 0x00010000
38 #define ACTION_REVOCATION_DEFAULT_CACHE 0x00020000
39 
41 
42 #define CERT_DISPWELL_SELECT 1
43 #define CERT_DISPWELL_TRUST_CA_CERT 2
44 #define CERT_DISPWELL_TRUST_LEAF_CERT 3
45 #define CERT_DISPWELL_TRUST_ADD_CA_CERT 4
46 #define CERT_DISPWELL_TRUST_ADD_LEAF_CERT 5
47 #define CERT_DISPWELL_DISTRUST_CA_CERT 6
48 #define CERT_DISPWELL_DISTRUST_LEAF_CERT 7
49 #define CERT_DISPWELL_DISTRUST_ADD_CA_CERT 8
50 #define CERT_DISPWELL_DISTRUST_ADD_LEAF_CERT 9
51 
53 
54 #define CSS_SELECTCERT_MASK 0x00ffffff
55 #define CSS_HIDE_PROPERTIES 0x00000001
56 #define CSS_ENABLEHOOK 0x00000002
57 #define CSS_ALLOWMULTISELECT 0x00000004
58 #define CSS_SHOW_HELP 0x00000010
59 #define CSS_ENABLETEMPLATE 0x00000020
60 #define CSS_ENABLETEMPLATEHANDLE 0x00000040
61 
62 #define SELCERT_OK IDOK
63 #define SELCERT_CANCEL IDCANCEL
64 #define SELCERT_PROPERTIES 100
65 #define SELCERT_FINEPRINT 101
66 #define SELCERT_CERTLIST 102
67 #define SELCERT_HELP IDHELP
68 #define SELCERT_ISSUED_TO 103
69 #define SELCERT_VALIDITY 104
70 #define SELCERT_ALGORITHM 105
71 #define SELCERT_SERIAL_NUM 106
72 #define SELCERT_THUMBPRINT 107
73 
74 typedef struct tagCSSA
75 {
94 
95 typedef struct tagCSSW
96 {
115 
116 #define CERT_SELECT_STRUCT WINELIB_NAME_AW(CERT_SELECT_STRUCT_)
117 
120 #define CertSelectCertificate WINELIB_NAME_AW(CertSelectCertificate)
121 
122 #define CM_VIEWFLAGS_MASK 0x00ffffff
123 #define CM_ENABLEHOOK 0x00000001
124 #define CM_SHOW_HELP 0x00000002
125 #define CM_SHOW_HELPICON 0x00000004
126 #define CM_ENABLETEMPLATE 0x00000008
127 #define CM_HIDE_ADVANCEPAGE 0x00000010
128 #define CM_HIDE_TRUSTPAGE 0x00000020
129 #define CM_NO_NAMECHANGE 0x00000040
130 #define CM_NO_EDITTRUST 0x00000080
131 #define CM_HIDE_DETAILPAGE 0x00000100
132 #define CM_ADD_CERT_STORES 0x00000200
133 #define CERTVIEW_CRYPTUI_LPARAM 0x00800000
134 
136 {
158  /* FIXME: PSDK declares arrayPropSheetPages as a PROPSHEETPAGE *, which we
159  * don't allow in our own headers. It's probably wrong, but we're not
160  * compatible.
161  */
164 
166 {
188  /* FIXME: PSDK declares arrayPropSheetPages as a PROPSHEETPAGE *, which we
189  * don't allow in our own headers. It's probably wrong, but we're not
190  * compatible.
191  */
194 
195 #define CERT_VIEWPROPERTIES_STRUCT WINELIB_NAME_AW(CERT_VIEWPROPERTIES_STRUCT_)
196 #define PCERT_VIEWPROPERTIES_STRUCT \
197  WINELIB_NAME_AW(PCERT_VIEWPROPERTIES_STRUCT_)
198 
201 #define CertViewProperties WINELIB_NAME_AW(CertViewProperties)
202 
203 #define CERT_FILTER_OP_EXISTS 1
204 #define CERT_FILTER_OP_NOT_EXISTS 2
205 #define CERT_FILTER_OP_EQUALITY 3
206 
207 typedef struct tagCMOID
208 {
214 
215 #define CERT_FILTER_INCLUDE_V1_CERTS 0x0001
216 #define CERT_FILTER_VALID_TIME_RANGE 0x0002
217 #define CERT_FILTER_VALID_SIGNATURE 0x0004
218 #define CERT_FILTER_LEAF_CERTS_ONLY 0x0008
219 #define CERT_FILTER_ISSUER_CERTS_ONLY 0x0010
220 #define CERT_FILTER_KEY_EXISTS 0x0020
221 
222 typedef struct tagCMFLTR
223 {
229 
231  DWORD cchBuffer);
233  DWORD cchBuffer);
234 #define GetFriendlyNameOfCert WINELIB_NAME_AW(GetFriendlyNameOfCert)
235 
236 #define CERT_CERTIFICATE_ACTION_VERIFY \
237  { 0x7801ebd0, 0xcf4b, 0x11d0, { 0x85,0x1f,0x00,0x60,0x97,0x93,0x87,0xea }}
238 #define szCERT_CERTIFICATE_ACTION_VERIFY \
239  "{7801ebd0-cf4b-11d0-851f-0060979387ea}"
240 
242 
243 #define CERT_VALIDITY_MASK_VALIDITY 0x0000ffff
244 #define CERT_VALIDITY_BEFORE_START 0x00000001
245 #define CERT_VALIDITY_AFTER_END 0x00000002
246 #define CERT_VALIDITY_SIGNATURE_FAILS 0x00000004
247 #define CERT_VALIDITY_CERTIFICATE_REVOKED 0x00000008
248 #define CERT_VALIDITY_KEY_USAGE_EXT_FAILURE 0x00000010
249 #define CERT_VALIDITY_EXTENDED_USAGE_FAILURE 0x00000020
250 #define CERT_VALIDITY_NAME_CONSTRAINTS_FAILURE 0x00000040
251 #define CERT_VALIDITY_UNKNOWN_CRITICAL_EXTENSION 0x00000080
252 #define CERT_VALIDITY_ISSUER_INVALID 0x00000100
253 #define CERT_VALIDITY_OTHER_EXTENSION_FAILURE 0x00000200
254 #define CERT_VALIDITY_PERIOD_NESTING_FAILURE 0x00000400
255 #define CERT_VALIDITY_OTHER_ERROR 0x00000800
256 
257 #define CERT_VALIDITY_MASK_TRUST 0xffff0000
258 #define CERT_VALIDITY_EXPLICITLY_DISTRUSTED 0x01000000
259 #define CERT_VALIDITY_ISSUER_DISTRUST 0x02000000
260 #define CERT_VALIDITY_NO_ISSUER_CERT_FOUND 0x10000000
261 #define CERT_VALIDITY_NO_CRL_FOUND 0x20000000
262 #define CERT_VALIDITY_CRL_OUT_OF_DATE 0x40000000
263 #define CERT_VALIDITY_NO_TRUST_DATA 0x80000000
264 
265 #define CERT_TRUST_MASK 0x00ffffff
266 #define CERT_TRUST_DO_FULL_SEARCH 0x00000001
267 #define CERT_TRUST_PERMIT_MISSING_CRLS 0x00000002
268 #define CERT_TRUST_DO_FULL_TRUST 0x00000005
269 #define CERT_TRUST_ADD_CERT_STORES CM_ADD_CERT_STORES
270 
272 {
293 
294 #define CTL_MODIFY_REQUEST_ADD_NOT_TRUSTED 1
295 #define CTL_MODIFY_REQUEST_REMOVE 2
296 #define CTL_MODIFY_REQUEST_ADD_TRUSTED 3
297 
298 typedef struct _CTL_MODIFY_REQUEST
299 {
304 
306  PCTL_MODIFY_REQUEST rgCerts, LPCSTR szPurpose, HWND hwnd,
307  HCERTSTORE hcertstoreTrust);
308 
309 #ifdef __cplusplus
310 }
311 #endif
312 
313 #endif
DWORD lCustData
Definition: cryptdlg.h:87
LPCWSTR pTemplateName
Definition: cryptdlg.h:100
struct _CERT_VERIFY_CERTIFICATE_TRUST * PCERT_VERIFY_CERTIFICATE_TRUST
struct _CERT_VERIFY_CERTIFICATE_TRUST CERT_VERIFY_CERTIFICATE_TRUST
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define HRESULT
Definition: msvc.h:7
DWORD lCustData
Definition: cryptdlg.h:108
DWORD cCertStore
Definition: cryptdlg.h:103
struct _CTL_MODIFY_REQUEST CTL_MODIFY_REQUEST
struct tagCERT_VIEWPROPERTIES_STRUCT_A CERT_VIEWPROPERTIES_STRUCT_A
HINSTANCE hInstance
Definition: cryptdlg.h:99
struct tagCMFLTR CERT_FILTER_DATA
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
PCCERT_CONTEXT ** prgChain
Definition: cryptdlg.h:289
DWORD dwHelpId
Definition: cryptdlg.h:112
DWORD dwSize
Definition: cryptdlg.h:224
HCERTSTORE * arrayCertStore
Definition: cryptdlg.h:83
HANDLE HWND
Definition: compat.h:19
PCCERT_CONTEXT * arrayCertContext
Definition: cryptdlg.h:86
PFNCMHOOKPROC pfnHook
Definition: cryptdlg.h:109
PFNCMFILTERPROC pfnFilter
Definition: cryptdlg.h:110
UINT_PTR WPARAM
Definition: windef.h:207
PFNCMFILTERPROC pfnFilter
Definition: cryptdlg.h:89
char * LPSTR
Definition: xmlstorage.h:182
#define BOOL
Definition: nt_native.h:43
LPCSTR pTemplateName
Definition: cryptdlg.h:79
#define DWORD
Definition: nt_native.h:44
struct tagCSSA * PCERT_SELECT_STRUCT_A
HCRYPTPROV hprov
Definition: cryptdlg.h:113
PCCERT_CONTEXT * arrayCertContext
Definition: cryptdlg.h:107
DWORD dwCheckingFlags
Definition: cryptdlg.h:227
DWORD dwSize
Definition: cryptdlg.h:76
unsigned char * LPBYTE
Definition: typedefs.h:53
DWORD cCertContext
Definition: cryptdlg.h:85
unsigned int BOOL
Definition: ntddk_ex.h:94
LPCWSTR szTitle
Definition: cryptdlg.h:102
static DWORD cchBuffer
Definition: fusion.c:85
HWND hwndParent
Definition: cryptdlg.h:77
struct tagCSSW CERT_SELECT_STRUCT_W
struct tagCMOID CERT_FILTER_EXTENSION_MATCH
LONG_PTR LPARAM
Definition: windef.h:208
const char * LPCSTR
Definition: xmlstorage.h:183
PROPSHEETPAGEA * arrayPropSheetPages
Definition: cryptdlg.h:162
BOOL(WINAPI * PFNCMFILTERPROC)(PCCERT_CONTEXT, DWORD, DWORD, DWORD)
Definition: cryptdlg.h:40
BOOL WINAPI CertSelectCertificateA(PCERT_SELECT_STRUCT_A pCertSelectInfo)
DWORD dwFlags
Definition: cryptdlg.h:80
DWORD WINAPI GetFriendlyNameOfCertW(PCCERT_CONTEXT pccert, LPWSTR pchBuffer, DWORD cchBuffer)
Definition: main.c:72
PCCERT_CONTEXT pccert
Definition: cryptdlg.h:300
LONG HRESULT
Definition: typedefs.h:79
HINSTANCE hInstance
Definition: cryptdlg.h:78
const CERT_CONTEXT * PCCERT_CONTEXT
Definition: wincrypt.h:485
#define WINAPI
Definition: msvc.h:6
HCERTSTORE * arrayCertStore
Definition: cryptdlg.h:104
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD cCertContext
Definition: cryptdlg.h:106
DWORD cCertStore
Definition: cryptdlg.h:82
DWORD dwSize
Definition: cryptdlg.h:97
CERT_FILTER_EXTENSION_MATCH * arrayExtensionChecks
Definition: cryptdlg.h:226
DWORD cExtensionChecks
Definition: cryptdlg.h:225
struct tagCERT_VIEWPROPERTIES_STRUCT_W CERT_VIEWPROPERTIES_STRUCT_W
LPCSTR szHelpFileName
Definition: cryptdlg.h:90
struct tagCERT_VIEWPROPERTIES_STRUCT_W * PCERT_VIEWPROPERTIES_STRUCT_W
LPCWSTR szHelpFileName
Definition: cryptdlg.h:111
LPCSTR szTitle
Definition: cryptdlg.h:81
struct tagCERT_VIEWPROPERTIES_STRUCT_A * PCERT_VIEWPROPERTIES_STRUCT_A
UINT(WINAPI * PFNCMHOOKPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: cryptdlg.h:52
DWORD dwFlags
Definition: cryptdlg.h:101
HRESULT(WINAPI * PFNTRUSTHELPER)(PCCERT_CONTEXT, DWORD, BOOL, LPBYTE)
Definition: cryptdlg.h:241
ULONG_PTR HCRYPTPROV
Definition: wincrypt.h:46
DWORD dwHelpId
Definition: cryptdlg.h:91
unsigned int UINT
Definition: ndis.h:50
HRESULT WINAPI CertModifyCertificatesToTrust(int cCertStore, PCTL_MODIFY_REQUEST rgCerts, LPCSTR szPurpose, HWND hwnd, HCERTSTORE hcertstoreTrust)
PROPSHEETPAGEW * arrayPropSheetPages
Definition: cryptdlg.h:192
PFNCMHOOKPROC pfnHook
Definition: cryptdlg.h:88
struct tagCSSA CERT_SELECT_STRUCT_A
HWND hwndParent
Definition: cryptdlg.h:98
PFNTRUSTHELPER pfnTrustHelper
Definition: cryptdlg.h:287
struct tagCSSW * PCERT_SELECT_STRUCT_W
struct _CTL_MODIFY_REQUEST * PCTL_MODIFY_REQUEST
DWORD dwTestOperation
Definition: cryptdlg.h:210
WCHAR * LPWSTR
Definition: xmlstorage.h:184
LPBYTE pbTestData
Definition: cryptdlg.h:211
LPCSTR szExtensionOID
Definition: cryptdlg.h:209
LPCSTR szPurposeOid
Definition: cryptdlg.h:105
LPCSTR szPurposeOid
Definition: cryptdlg.h:84
DWORD WINAPI GetFriendlyNameOfCertA(PCCERT_CONTEXT pccert, LPSTR pchBuffer, DWORD cchBuffer)
Definition: main.c:62
DWORD cbTestData
Definition: cryptdlg.h:212
BOOL WINAPI CertViewPropertiesA(PCERT_VIEWPROPERTIES_STRUCT_A pCertViewInfo)
HCRYPTPROV hprov
Definition: cryptdlg.h:92
BOOL WINAPI CertViewPropertiesW(PCERT_VIEWPROPERTIES_STRUCT_W pCertViewInfo)
BOOL WINAPI CertSelectCertificateW(PCERT_SELECT_STRUCT_W pCertSelectInfo)