[PSDK]
[reactos.git] / reactos / include / psdk / schannel.h
1 #ifndef _SCHANNEL_H
2 #define _SCHANNEL_H
3
4 #include <wincrypt.h>
5
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9
10 #define SCHANNEL_NAME_A "Schannel"
11 #define SCHANNEL_NAME_W L"Schannel"
12 #ifdef UNICODE
13 #define SCHANNEL_NAME SCHANNEL_NAME_W
14 #else
15 #define SCHANNEL_NAME SCHANNEL_NAME_A
16 #endif
17
18 #define SCH_CRED_V1 1
19 #define SCH_CRED_V2 2
20 #define SCH_CRED_VERSION 2
21 #define SCH_CRED_V3 3
22 #define SCHANNEL_CRED_VERSION 4
23
24 #define SCHANNEL_RENEGOTIATE 0
25 #define SCHANNEL_SHUTDOWN 1
26 #define SCHANNEL_ALERT 2
27 #define SCHANNEL_SESSION 3
28
29 #define SP_PROT_TLS1_CLIENT 128
30 #define SP_PROT_TLS1_1_CLIENT 512
31 #define SP_PROT_TLS1_0_CLIENT SP_PROT_TLS1_CLIENT
32 #define SP_PROT_TLS1_2_CLIENT 2048
33
34 #define SP_PROT_TLS1_SERVER 64
35 #define SP_PROT_SSL3_CLIENT 32
36 #define SP_PROT_SSL3_SERVER 16
37 #define SP_PROT_SSL2_CLIENT 8
38 #define SP_PROT_SSL2_SERVER 4
39 #define SP_PROT_PCT1_CLIENT 2
40 #define SP_PROT_PCT1_SERVER 1
41
42 #define SP_PROT_TLS1 (SP_PROT_TLS1_CLIENT | SP_PROT_TLS1_SERVER)
43 #define SP_PROT_SSL3 (SP_PROT_SSL3_CLIENT | SP_PROT_SSL3_SERVER)
44 #define SP_PROT_SSL2 (SP_PROT_SSL2_CLIENT | SP_PROT_SSL2_SERVER)
45 #define SP_PROT_PCT1 (SP_PROT_PCT1_CLIENT | SP_PROT_PCT1_SERVER)
46
47 #define SP_PROT_TLS1_1PLUS_CLIENT (SP_PROT_TLS1_1_CLIENT | SP_PROT_TLS1_2_CLIENT)
48
49 #define SCH_CRED_NO_SYSTEM_MAPPER 2
50 #define SCH_CRED_NO_SERVERNAME_CHECK 4
51 #define SCH_CRED_MANUAL_CRED_VALIDATION 8
52 #define SCH_CRED_NO_DEFAULT_CREDS 16
53 #define SCH_CRED_AUTO_CRED_VALIDATION 32
54 #define SCH_CRED_USE_DEFAULT_CREDS 64
55 #define SCH_CRED_REVOCATION_CHECK_CHAIN_END_CERT 256
56 #define SCH_CRED_REVOCATION_CHECK_CHAIN 512
57 #define SCH_CRED_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT 1024
58 #define SCH_CRED_IGNORE_NO_REVOCATION_CHECK 2048
59 #define SCH_CRED_IGNORE_REVOCATION_OFFLINE 4096
60
61 #define SECPKG_ATTR_ISSUER_LIST 0x50
62 #define SECPKG_ATTR_REMOTE_CRED 0x51
63 #define SECPKG_ATTR_LOCAL_CRED 0x52
64 #define SECPKG_ATTR_REMOTE_CERT_CONTEXT 0x53
65 #define SECPKG_ATTR_LOCAL_CERT_CONTEXT 0x54
66 #define SECPKG_ATTR_ROOT_STORE 0x55
67 #define SECPKG_ATTR_SUPPORTED_ALGS 0x56
68 #define SECPKG_ATTR_CIPHER_STRENGTHS 0x57
69 #define SECPKG_ATTR_SUPPORTED_PROTOCOLS 0x58
70 #define SECPKG_ATTR_ISSUER_LIST_EX 0x59
71 #define SECPKG_ATTR_CONNECTION_INFO 0x5a
72 #define SECPKG_ATTR_EAP_KEY_BLOCK 0x5b
73 #define SECPKG_ATTR_MAPPED_CRED_ATTR 0x5c
74 #define SECPKG_ATTR_SESSION_INFO 0x5d
75 #define SECPKG_ATTR_APP_DATA 0x5e
76
77 #define UNISP_RPC_ID 14
78
79 struct _HMAPPER;
80
81 typedef struct _SCHANNEL_CRED
82 {
83 DWORD dwVersion;
84 DWORD cCreds;
85 PCCERT_CONTEXT *paCred;
86 HCERTSTORE hRootStore;
87 DWORD cMappers;
88 struct _HMAPPER **aphMappers;
89 DWORD cSupportedAlgs;
90 ALG_ID *palgSupportedAlgs;
91 DWORD grbitEnabledProtocols;
92 DWORD dwMinimumCipherStrength;
93 DWORD dwMaximumCipherStrength;
94 DWORD dwSessionLifespan;
95 DWORD dwFlags;
96 DWORD dwCredFormat;
97 } SCHANNEL_CRED, *PSCHANNEL_CRED;
98
99 typedef struct _SecPkgCred_SupportedAlgs
100 {
101 DWORD cSupportedAlgs;
102 ALG_ID *palgSupportedAlgs;
103 } SecPkgCred_SupportedAlgs, *PSecPkgCred_SupportedAlgs;
104
105 typedef struct _SecPkgCred_CipherStrengths
106 {
107 DWORD dwMinimumCipherStrength;
108 DWORD dwMaximumCipherStrength;
109 } SecPkgCred_CipherStrengths, *PSecPkgCred_CipherStrengths;
110
111 typedef struct _SecPkgCred_SupportedProtocols
112 {
113 DWORD grbitProtocol;
114 } SecPkgCred_SupportedProtocols, *PSecPkgCred_SupportedProtocols;
115
116 typedef struct _SecPkgContext_IssuerListInfoEx
117 {
118 PCERT_NAME_BLOB aIssuers;
119 DWORD cIssuers;
120 } SecPkgContext_IssuerListInfoEx, *PSecPkgContext_IssuerListInfoEx;
121
122 typedef struct _SecPkgContext_ConnectionInfo
123 {
124 DWORD dwProtocol;
125 ALG_ID aiCipher;
126 DWORD dwCipherStrength;
127 ALG_ID aiHash;
128 DWORD dwHashStrength;
129 ALG_ID aiExch;
130 DWORD dwExchStrength;
131 } SecPkgContext_ConnectionInfo, *PSecPkgContext_ConnectionInfo;
132
133 #ifdef __cplusplus
134 }
135 #endif
136
137 #endif /* _SCHANNEL_H */