[XDK]
[reactos.git] / 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_SERVER 64
31 #define SP_PROT_SSL3_CLIENT 32
32 #define SP_PROT_SSL3_SERVER 16
33 #define SP_PROT_SSL2_CLIENT 8
34 #define SP_PROT_SSL2_SERVER 4
35 #define SP_PROT_PCT1_CLIENT 2
36 #define SP_PROT_PCT1_SERVER 1
37
38 #define SP_PROT_TLS1 (SP_PROT_TLS1_CLIENT | SP_PROT_TLS1_SERVER)
39 #define SP_PROT_SSL3 (SP_PROT_SSL3_CLIENT | SP_PROT_SSL3_SERVER)
40 #define SP_PROT_SSL2 (SP_PROT_SSL2_CLIENT | SP_PROT_SSL2_SERVER)
41 #define SP_PROT_PCT1 (SP_PROT_PCT1_CLIENT | SP_PROT_PCT1_SERVER)
42
43 #define SCH_CRED_NO_SYSTEM_MAPPER 2
44 #define SCH_CRED_NO_SERVERNAME_CHECK 4
45 #define SCH_CRED_MANUAL_CRED_VALIDATION 8
46 #define SCH_CRED_NO_DEFAULT_CREDS 16
47 #define SCH_CRED_AUTO_CRED_VALIDATION 32
48 #define SCH_CRED_USE_DEFAULT_CREDS 64
49 #define SCH_CRED_REVOCATION_CHECK_CHAIN_END_CERT 256
50 #define SCH_CRED_REVOCATION_CHECK_CHAIN 512
51 #define SCH_CRED_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT 1024
52 #define SCH_CRED_IGNORE_NO_REVOCATION_CHECK 2048
53 #define SCH_CRED_IGNORE_REVOCATION_OFFLINE 4096
54
55 #define SECPKG_ATTR_ISSUER_LIST 0x50
56 #define SECPKG_ATTR_REMOTE_CRED 0x51
57 #define SECPKG_ATTR_LOCAL_CRED 0x52
58 #define SECPKG_ATTR_REMOTE_CERT_CONTEXT 0x53
59 #define SECPKG_ATTR_LOCAL_CERT_CONTEXT 0x54
60 #define SECPKG_ATTR_ROOT_STORE 0x55
61 #define SECPKG_ATTR_SUPPORTED_ALGS 0x56
62 #define SECPKG_ATTR_CIPHER_STRENGTHS 0x57
63 #define SECPKG_ATTR_SUPPORTED_PROTOCOLS 0x58
64 #define SECPKG_ATTR_ISSUER_LIST_EX 0x59
65 #define SECPKG_ATTR_CONNECTION_INFO 0x5a
66 #define SECPKG_ATTR_EAP_KEY_BLOCK 0x5b
67 #define SECPKG_ATTR_MAPPED_CRED_ATTR 0x5c
68 #define SECPKG_ATTR_SESSION_INFO 0x5d
69 #define SECPKG_ATTR_APP_DATA 0x5e
70
71 #define UNISP_RPC_ID 14
72
73 struct _HMAPPER;
74
75 typedef struct _SCHANNEL_CRED
76 {
77 DWORD dwVersion;
78 DWORD cCreds;
79 PCCERT_CONTEXT *paCred;
80 HCERTSTORE hRootStore;
81 DWORD cMappers;
82 struct _HMAPPER **aphMappers;
83 DWORD cSupportedAlgs;
84 ALG_ID *palgSupportedAlgs;
85 DWORD grbitEnabledProtocols;
86 DWORD dwMinimumCipherStrength;
87 DWORD dwMaximumCipherStrength;
88 DWORD dwSessionLength;
89 DWORD dwFlags;
90 DWORD reserved;
91 } SCHANNEL_CRED, *PSCHANNEL_CRED;
92
93 typedef struct _SecPkgCred_SupportedAlgs
94 {
95 DWORD cSupportedAlgs;
96 ALG_ID *palgSupportedAlgs;
97 } SecPkgCred_SupportedAlgs, *PSecPkgCred_SupportedAlgs;
98
99 typedef struct _SecPkgCred_CipherStrengths
100 {
101 DWORD dwMinimumCipherStrength;
102 DWORD dwMaximumCipherStrength;
103 } SecPkgCred_CipherStrengths, *PSecPkgCred_CipherStrengths;
104
105 typedef struct _SecPkgCred_SupportedProtocols
106 {
107 DWORD grbitProtocol;
108 } SecPkgCred_SupportedProtocols, *PSecPkgCred_SupportedProtocols;
109
110 typedef struct _SecPkgContext_IssuerListInfoEx
111 {
112 PCERT_NAME_BLOB aIssuers;
113 DWORD cIssuers;
114 } SecPkgContext_IssuerListInfoEx, *PSecPkgContext_IssuerListInfoEx;
115
116 typedef struct _SecPkgContext_ConnectionInfo
117 {
118 DWORD dwProtocol;
119 ALG_ID aiCipher;
120 DWORD dwCipherStrength;
121 ALG_ID aiHash;
122 DWORD dwHashStrength;
123 ALG_ID aiExch;
124 DWORD dwExchStrength;
125 } SecPkgContext_ConnectionInfo, *PSecPkgContext_ConnectionInfo;
126
127 #ifdef __cplusplus
128 }
129 #endif
130
131 #endif /* _SCHANNEL_H */