3 * @copy 2012 MinGW.org project
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice (including the next
13 * paragraph) shall be included in all copies or substantial portions of the
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
26 #pragma GCC system_header
34 #define SCHANNEL_CRED_VERSION 4
35 #define SCHANNEL_SHUTDOWN 1
36 /* ? Do these belong here or in wincrypt.h */
37 #define AUTHTYPE_CLIENT 1
38 #define AUTHTYPE_SERVER 2
40 #define SP_PROT_TLS1_CLIENT 128
41 #define SP_PROT_TLS1_SERVER 64
42 #define SP_PROT_SSL3_CLIENT 32
43 #define SP_PROT_SSL3_SERVER 16
44 #define SP_PROT_SSL2_CLIENT 8
45 #define SP_PROT_SSL2_SERVER 4
46 #define SP_PROT_PCT1_SERVER 1
47 #define SP_PROT_PCT1_CLIENT 2
49 #define SP_PROT_PCT1 (SP_PROT_PCT1_CLIENT|SP_PROT_PCT1_SERVER)
50 #define SP_PROT_TLS1 (SP_PROT_TLS1_CLIENT|SP_PROT_TLS1_SERVER)
51 #define SP_PROT_SSL2 (SP_PROT_SSL2_CLIENT|SP_PROT_SSL2_SERVER)
52 #define SP_PROT_SSL3 (SP_PROT_SSL3_CLIENT|SP_PROT_SSL3_SERVER)
54 #define SCH_CRED_NO_SYSTEM_MAPPER 2
55 #define SCH_CRED_NO_SERVERNAME_CHECK 4
56 #define SCH_CRED_MANUAL_CRED_VALIDATION 8
57 #define SCH_CRED_NO_DEFAULT_CREDS 16
58 #define SCH_CRED_AUTO_CRED_VALIDATION 32
59 #define SCH_CRED_REVOCATION_CHECK_CHAIN 512
60 #define SCH_CRED_REVOCATION_CHECK_END_CERT 256
61 #define SCH_CRED_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT 1024
62 #define SCH_CRED_IGNORE_NO_REVOCATION_CHECK 2048
63 #define SCH_CRED_IGNORE_REVOCATION_OFFLINE 4096
64 #define SCH_CRED_USE_DEFAULT_CREDS 64
66 typedef struct _SCHANNEL_CRED {
69 PCCERT_CONTEXT* paCred;
70 HCERTSTORE hRootStore;
72 struct _HMAPPER** aphMappers;
74 ALG_ID* palgSupportedAlgs;
75 DWORD grbitEnabledProtocols;
76 DWORD dwMinimumCypherStrength;
77 DWORD dwMaximumCypherStrength;
78 DWORD dwSessionLifespan;
81 } SCHANNEL_CRED, *PSCHANNEL_CRED;
82 typedef struct _SecPkgCred_SupportedAlgs {
84 ALG_ID* palgSupportedAlgs;
85 } SecPkgCred_SupportedAlgs, *PSecPkgCred_SupportedAlgs;
86 typedef struct _SecPkgCred_CypherStrengths {
87 DWORD dwMinimumCypherStrength;
88 DWORD dwMaximumCypherStrength;
89 } SecPkgCred_CypherStrengths, *PSecPkgCred_CypherStrengths;
90 typedef struct _SecPkgCred_SupportedProtocols {
92 } SecPkgCred_SupportedProtocols, *PSecPkgCred_SupportedProtocols;
93 typedef struct _SecPkgContext_IssuerListInfoEx {
94 PCERT_NAME_BLOB aIssuers;
96 } SecPkgContext_IssuerListInfoEx, *PSecPkgContext_IssuerListInfoEx;
97 typedef struct _SecPkgContext_ConnectionInfo {
100 DWORD dwCipherStrength;
102 DWORD dwHashStrength;
104 DWORD dwExchStrength;
105 } SecPkgContext_ConnectionInfo, *PSecPkgContext_ConnectionInfo;
111 #endif /* _SCHANNEL_H */