kernel32: Stub FindFirstStreamW/FindNextStreamW.
[wine.git] / include / schannel.h
blobb48a71947e67ebdf45b35ef36f3b1eb4b4412442
1 /*
2 * Copyright (C) 2005 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 __WINE_SCHANNEL_H__
19 #define __WINE_SCHANNEL_H__
21 #include <wincrypt.h>
23 /* Package names */
24 #define UNISP_NAME_A "Microsoft Unified Security Protocol Provider"
25 #if defined(__GNUC__)
26 #define UNISP_NAME_W (const WCHAR []){ 'M','i','c','r','o','s','o','f','t',\
27 ' ','U','n','i','f','i','e','d',' ','S','e','c','u','r','i','t','y',' ',\
28 'P','r','o','t','o','c','o','l',' ','P','r','o','v','i','d','e','r',0 }
29 #elif defined(_MSC_VER)
30 #define UNISP_NAME_W L"Microsoft Unified Security Protocol Provider"
31 #else
32 static const WCHAR UNISP_NAME_W[] = { 'M','i','c','r','o','s','o','f','t',
33 ' ','U','n','i','f','i','e','d',' ','S','e','c','u','r','i','t','y',' ',
34 'P','r','o','t','o','c','o','l',' ','P','r','o','v','i','d','e','r',0 };
35 #endif
36 #define UNISP_NAME WINELIB_NAME_AW(UNISP_NAME_)
38 #define SSL2SP_NAME_A "Microsoft SSL 2.0"
39 #if defined(__GNUC__)
40 #define SSL2SP_NAME_W (const WCHAR []){ 'M','i','c','r','o','s','o','f','t',\
41 ' ','S','S','L',' ','2','.','0',0 }
42 #elif defined(_MSC_VER)
43 #define SSL2SP_NAME_W L"Microsoft SSL 2.0"
44 #else
45 static const WCHAR SSL2SP_NAME_W[] = { 'M','i','c','r','o','s','o','f','t',
46 ' ','S','S','L',' ','2','.','0',0 };
47 #endif
48 #define SSL2SP_NAME WINELIB_NAME_AW(SSL2SP_NAME_)
50 #define SSL3SP_NAME_A "Microsoft SSL 3.0"
51 #if defined(__GNUC__)
52 #define SSL3SP_NAME_W (const WCHAR []){ 'M','i','c','r','o','s','o','f','t',\
53 ' ','S','S','L',' ','3','.','0',0 }
54 #elif defined(_MSC_VER)
55 #define SSL3SP_NAME_W L"Microsoft SSL 3.0"
56 #else
57 static const WCHAR SSL3SP_NAME_W[] = { 'M','i','c','r','o','s','o','f','t',
58 ' ','S','S','L',' ','3','.','0',0 };
59 #endif
60 #define SSL3SP_NAME WINELIB_NAME_AW(SSL3SP_NAME_)
62 #define TLS1SP_NAME_A "Microsoft TLS 1.0"
63 #if defined(__GNUC__)
64 #define TLS1SP_NAME_W (const WCHAR []){ 'M','i','c','r','o','s','o','f','t',\
65 ' ','T','L','S',' ','1','.','0',0 }
66 #elif defined(_MSC_VER)
67 #define TLS1SP_NAME_W L"Microsoft TLS 1.0"
68 #else
69 static const WCHAR TLS1SP_NAME_W[] = { 'M','i','c','r','o','s','o','f','t',
70 ' ','T','L','S',' ','1','.','0',0 };
71 #endif
72 #define TLS1SP_NAME WINELIB_NAME_AW(TLS1SP_NAME_)
74 #define PCT1SP_NAME_A "Microsoft PCT 1.0"
75 #if defined(__GNUC__)
76 #define PCT1SP_NAME_W (const WCHAR []){ 'M','i','c','r','o','s','o','f','t',\
77 ' ','P','C','T',' ','1','.','0',0 }
78 #elif defined(_MSC_VER)
79 #define PCT1SP_NAME_W L"Microsoft PCT 1.0"
80 #else
81 static const WCHAR PCT1SP_NAME_W[] = { 'M','i','c','r','o','s','o','f','t',
82 ' ','P','C','T',' ','1','.','0',0 };
83 #endif
84 #define PCT1SP_NAME WINELIB_NAME_AW(PCT1SP_NAME_)
86 #define SCHANNEL_NAME_A "Schannel"
87 #if defined(__GNUC__)
88 #define SCHANNEL_NAME_W (const WCHAR []){ 'S','c','h','a','n','n','e','l',0 }
89 #elif defined(_MSC_VER)
90 #define SCHANNEL_NAME_W L"Schannel"
91 #else
92 static const WCHAR SCHANNEL_NAME_W[] = { 'S','c','h','a','n','n','e','l',0 };
93 #endif
94 #define SCHANNEL_NAME WINELIB_NAME_AW(SCHANNEL_NAME_)
96 #define SCH_CRED_V1 1
97 #define SCH_CRED_V2 2
98 #define SCH_CRED_VERSION 2
99 #define SCH_CRED_V3 3
100 #define SCHANNEL_CRED_VERSION 4
102 #define SCHANNEL_RENEGOTIATE 0
103 #define SCHANNEL_SHUTDOWN 1
104 #define SCHANNEL_ALERT 2
105 #define SCHANNEL_SESSION 3
107 #define SP_PROT_ALL 0xffffffff
108 #define SP_PROT_UNI_CLIENT 0x80000000
109 #define SP_PROT_UNI_SERVER 0x40000000
110 #define SP_PROT_DTLS1_2_SERVER 0x00040000
111 #define SP_PROT_DTLS1_2_CLIENT 0x00080000
112 #define SP_PROT_DTLS_SERVER 0x00010000
113 #define SP_PROT_DTLS_CLIENT 0x00020000
114 #define SP_PROT_DTLS1_0_SERVER SP_PROT_DTLS_SERVER
115 #define SP_PROT_DTLS1_0_CLIENT SP_PROT_DTLS_CLIENT
116 #define SP_PROT_TLS1_3_SERVER 0x00001000
117 #define SP_PROT_TLS1_3_CLIENT 0x00002000
118 #define SP_PROT_TLS1_2_CLIENT 0x00000800
119 #define SP_PROT_TLS1_2_SERVER 0x00000400
120 #define SP_PROT_TLS1_1_CLIENT 0x00000200
121 #define SP_PROT_TLS1_1_SERVER 0x00000100
122 #define SP_PROT_TLS1_0_CLIENT SP_PROT_TLS1_CLIENT
123 #define SP_PROT_TLS1_0_SERVER SP_PROT_TLS1_SERVER
124 #define SP_PROT_TLS1_CLIENT 0x00000080
125 #define SP_PROT_TLS1_SERVER 0x00000040
126 #define SP_PROT_SSL3_CLIENT 0x00000020
127 #define SP_PROT_SSL3_SERVER 0x00000010
128 #define SP_PROT_SSL2_CLIENT 0x00000008
129 #define SP_PROT_SSL2_SERVER 0x00000004
130 #define SP_PROT_PCT1_CLIENT 0x00000002
131 #define SP_PROT_PCT1_SERVER 0x00000001
132 #define SP_PROT_NONE 0x00000000
134 #define SP_PROT_UNI (SP_PROT_UNI_CLIENT | SP_PROT_UNI_SERVER)
135 #define SP_PROT_DTLS (SP_PROT_DTLS_SERVER | SP_PROT_DTLS_CLIENT)
136 #define SP_PROT_DTLS1_0 (SP_PROT_DTLS1_0_SERVER | SP_PROT_DTLS1_0_CLIENT)
137 #define SP_PROT_DTLS1_2 (SP_PROT_DTLS1_2_SERVER | SP_PROT_DTLS1_2_CLIENT)
138 #define SP_PROT_TLS1_3 (SP_PROT_TLS1_3_CLIENT | SP_PROT_TLS1_3_SERVER)
139 #define SP_PROT_TLS1_2 (SP_PROT_TLS1_2_CLIENT | SP_PROT_TLS1_2_SERVER)
140 #define SP_PROT_TLS1_1 (SP_PROT_TLS1_1_CLIENT | SP_PROT_TLS1_1_SERVER)
141 #define SP_PROT_TLS1_0 (SP_PROT_TLS1_0_CLIENT | SP_PROT_TLS1_0_SERVER)
142 #define SP_PROT_TLS1 (SP_PROT_TLS1_CLIENT | SP_PROT_TLS1_SERVER)
143 #define SP_PROT_SSL3 (SP_PROT_SSL3_CLIENT | SP_PROT_SSL3_SERVER)
144 #define SP_PROT_SSL2 (SP_PROT_SSL2_CLIENT | SP_PROT_SSL2_SERVER)
145 #define SP_PROT_PCT1 (SP_PROT_PCT1_CLIENT | SP_PROT_PCT1_SERVER)
147 #define SP_PROT_SSL3TLS1_CLIENTS (SP_PROT_SSL3_CLIENT | SP_PROT_TLS1_CLIENT)
148 #define SP_PROT_SSL3TLS1_SERVERS (SP_PROT_SSL3_SERVER | SP_PROT_TLS1_SERVER)
149 #define SP_PROT_SSL3TLS1_X_CLIENTS (SP_PROT_SSL3_CLIENT | SP_PROT_TLS1_X_CLIENT)
150 #define SP_PROT_SSL3TLS1_X_SERVERS (SP_PROT_SSL3_SERVER | SP_PROT_TLS1_X_SERVER)
151 #define SP_PROT_TLS1_X_CLIENT ( SP_PROT_TLS1_0_CLIENT \
152 | SP_PROT_TLS1_1_CLIENT \
153 | SP_PROT_TLS1_2_CLIENT \
154 | SP_PROT_TLS1_3_CLIENT )
155 #define SP_PROT_TLS1_X_SERVER ( SP_PROT_TLS1_0_SERVER \
156 | SP_PROT_TLS1_1_SERVER \
157 | SP_PROT_TLS1_2_SERVER \
158 | SP_PROT_TLS1_3_SERVER )
159 #define SP_PROT_TLS1_1PLUS_CLIENT ( SP_PROT_TLS1_1_CLIENT \
160 | SP_PROT_TLS1_2_CLIENT \
161 | SP_PROT_TLS1_3_CLIENT)
162 #define SP_PROT_TLS1_1PLUS_SERVER ( SP_PROT_TLS1_1_SERVER \
163 | SP_PROT_TLS1_2_SERVER \
164 | SP_PROT_TLS1_3_SERVER )
165 #define SP_PROT_DTLS1_X_SERVER ( SP_PROT_DTLS1_0_SERVER \
166 | SP_PROT_DTLS1_2_SERVER )
167 #define SP_PROT_DTLS1_X_CLIENT ( SP_PROT_DTLS1_0_CLIENT \
168 | SP_PROT_DTLS1_2_CLIENT )
169 #define SP_PROT_DTLS1_X ( SP_PROT_DTLS1_X_SERVER \
170 | SP_PROT_DTLS1_X_CLIENT )
171 #define SP_PROT_CLIENTS (SP_PROT_PCT1_CLIENT | SP_PROT_SSL2_CLIENT | SP_PROT_SSL3_CLIENT \
172 | SP_PROT_TLS1_CLIENT | SP_PROT_UNI_CLIENT)
173 #define SP_PROT_SERVERS (SP_PROT_PCT1_SERVER | SP_PROT_SSL2_SERVER | SP_PROT_SSL3_SERVER \
174 | SP_PROT_TLS1_SERVER | SP_PROT_UNI_SERVER)
175 #define SP_PROT_X_CLIENTS ( SP_PROT_CLIENTS \
176 | SP_PROT_TLS1_X_CLIENT \
177 | SP_PROT_DTLS1_X_CLIENT)
178 #define SP_PROT_X_SERVERS ( SP_PROT_SERVERS \
179 | SP_PROT_TLS1_X_SERVER \
180 | SP_PROT_DTLS1_X_SERVER)
182 #define SP_PROT_SSL3TLS1 (SP_PROT_SSL3 | SP_PROT_TLS1)
183 #define SP_PROT_SSL3TLS1_X (SP_PROT_SSL3 | SP_PROT_TLS1_X)
184 #define SP_PROT_TLS1_X (SP_PROT_TLS1_X_CLIENT | SP_PROT_TLS1_X_SERVER)
185 #define SP_PROT_TLS1_1PLUS (SP_PROT_TLS1_1PLUS_CLIENT | SP_PROT_TLS1_1PLUS_SERVER)
187 #define SCH_CRED_NO_SYSTEM_MAPPER 2
188 #define SCH_CRED_NO_SERVERNAME_CHECK 4
189 #define SCH_CRED_MANUAL_CRED_VALIDATION 8
190 #define SCH_CRED_NO_DEFAULT_CREDS 16
191 #define SCH_CRED_AUTO_CRED_VALIDATION 32
192 #define SCH_CRED_USE_DEFAULT_CREDS 64
193 #define SCH_CRED_REVOCATION_CHECK_CHAIN_END_CERT 256
194 #define SCH_CRED_REVOCATION_CHECK_CHAIN 512
195 #define SCH_CRED_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT 1024
196 #define SCH_CRED_IGNORE_NO_REVOCATION_CHECK 2048
197 #define SCH_CRED_IGNORE_REVOCATION_OFFLINE 4096
199 #define SECPKG_ATTR_ISSUER_LIST 0x50
200 #define SECPKG_ATTR_REMOTE_CRED 0x51
201 #define SECPKG_ATTR_LOCAL_CRED 0x52
202 #define SECPKG_ATTR_REMOTE_CERT_CONTEXT 0x53
203 #define SECPKG_ATTR_LOCAL_CERT_CONTEXT 0x54
204 #define SECPKG_ATTR_ROOT_STORE 0x55
205 #define SECPKG_ATTR_SUPPORTED_ALGS 0x56
206 #define SECPKG_ATTR_CIPHER_STRENGTHS 0x57
207 #define SECPKG_ATTR_SUPPORTED_PROTOCOLS 0x58
208 #define SECPKG_ATTR_ISSUER_LIST_EX 0x59
209 #define SECPKG_ATTR_CONNECTION_INFO 0x5a
210 #define SECPKG_ATTR_EAP_KEY_BLOCK 0x5b
211 #define SECPKG_ATTR_MAPPED_CRED_ATTR 0x5c
212 #define SECPKG_ATTR_SESSION_INFO 0x5d
213 #define SECPKG_ATTR_APP_DATA 0x5e
215 #define UNISP_RPC_ID 14
217 struct _HMAPPER;
219 typedef struct _SCHANNEL_CRED
221 DWORD dwVersion;
222 DWORD cCreds;
223 PCCERT_CONTEXT *paCred;
224 HCERTSTORE hRootStore;
225 DWORD cMappers;
226 struct _HMAPPER **aphMappers;
227 DWORD cSupportedAlgs;
228 ALG_ID *palgSupportedAlgs;
229 DWORD grbitEnabledProtocols;
230 DWORD dwMinimumCipherStrength;
231 DWORD dwMaximumCipherStrength;
232 DWORD dwSessionLifespan;
233 DWORD dwFlags;
234 DWORD dwCredFormat;
235 } SCHANNEL_CRED, *PSCHANNEL_CRED;
237 typedef struct _SecPkgCred_SupportedAlgs
239 DWORD cSupportedAlgs;
240 ALG_ID *palgSupportedAlgs;
241 } SecPkgCred_SupportedAlgs, *PSecPkgCred_SupportedAlgs;
243 typedef struct _SecPkgCred_CipherStrengths
245 DWORD dwMinimumCipherStrength;
246 DWORD dwMaximumCipherStrength;
247 } SecPkgCred_CipherStrengths, *PSecPkgCred_CipherStrengths;
249 typedef struct _SecPkgCred_SupportedProtocols
251 DWORD grbitProtocol;
252 } SecPkgCred_SupportedProtocols, *PSecPkgCred_SupportedProtocols;
254 typedef struct _SecPkgContext_IssuerListInfoEx
256 PCERT_NAME_BLOB aIssuers;
257 DWORD cIssuers;
258 } SecPkgContext_IssuerListInfoEx, *PSecPkgContext_IssuerListInfoEx;
260 typedef struct _SecPkgContext_ConnectionInfo
262 DWORD dwProtocol;
263 ALG_ID aiCipher;
264 DWORD dwCipherStrength;
265 ALG_ID aiHash;
266 DWORD dwHashStrength;
267 ALG_ID aiExch;
268 DWORD dwExchStrength;
269 } SecPkgContext_ConnectionInfo, *PSecPkgContext_ConnectionInfo;
271 #endif /* __WINE_SCHANNEL_H__ */