File: schannel.d

package info (click to toggle)
gcc-arm-none-eabi 15%3A12.2.rel1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 959,712 kB
  • sloc: cpp: 3,275,382; ansic: 2,061,766; ada: 840,956; f90: 208,513; makefile: 76,132; asm: 73,433; xml: 50,448; exp: 34,146; sh: 32,436; objc: 15,637; fortran: 14,012; python: 11,991; pascal: 6,787; awk: 4,779; perl: 3,054; yacc: 338; ml: 285; lex: 201; haskell: 122
file content (107 lines) | stat: -rw-r--r-- 3,342 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/**
 * Windows API header module
 *
 * Translated from MinGW Windows headers
 *
 * Authors: Stewart Gordon
 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
 * Source: $(DRUNTIMESRC core/sys/windows/_schannel.d)
 */
module core.sys.windows.schannel;
version (Windows):
@system:

import core.sys.windows.wincrypt;
import core.sys.windows.windef;

enum DWORD SCHANNEL_CRED_VERSION = 4;
enum SCHANNEL_SHUTDOWN           = 1;
/* Comment from MinGW
    ? Do these belong here or in wincrypt.h
 */
enum : DWORD {
    AUTHTYPE_CLIENT = 1,
    AUTHTYPE_SERVER = 2
}

enum DWORD
    SP_PROT_PCT1_SERVER = 0x01,
    SP_PROT_PCT1_CLIENT = 0x02,
    SP_PROT_SSL2_SERVER = 0x04,
    SP_PROT_SSL2_CLIENT = 0x08,
    SP_PROT_SSL3_SERVER = 0x10,
    SP_PROT_SSL3_CLIENT = 0x20,
    SP_PROT_TLS1_SERVER = 0x40,
    SP_PROT_TLS1_CLIENT = 0x80,
    SP_PROT_PCT1        = SP_PROT_PCT1_CLIENT | SP_PROT_PCT1_SERVER,
    SP_PROT_TLS1        = SP_PROT_TLS1_CLIENT | SP_PROT_TLS1_SERVER,
    SP_PROT_SSL2        = SP_PROT_SSL2_CLIENT | SP_PROT_SSL2_SERVER,
    SP_PROT_SSL3        = SP_PROT_SSL3_CLIENT | SP_PROT_SSL3_SERVER;

enum DWORD
    SCH_CRED_NO_SYSTEM_MAPPER                    = 0x0002,
    SCH_CRED_NO_SERVERNAME_CHECK                 = 0x0004,
    SCH_CRED_MANUAL_CRED_VALIDATION              = 0x0008,
    SCH_CRED_NO_DEFAULT_CREDS                    = 0x0010,
    SCH_CRED_AUTO_CRED_VALIDATION                = 0x0020,
    SCH_CRED_USE_DEFAULT_CREDS                   = 0x0040,
    SCH_CRED_REVOCATION_CHECK_END_CERT           = 0x0100,
    SCH_CRED_REVOCATION_CHECK_CHAIN              = 0x0200,
    SCH_CRED_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT = 0x0400,
    SCH_CRED_IGNORE_NO_REVOCATION_CHECK          = 0x0800,
    SCH_CRED_IGNORE_REVOCATION_OFFLINE           = 0x1000;

// No definition - presumably an opaque structure
struct _HMAPPER;

struct SCHANNEL_CRED {
    DWORD           dwVersion = SCHANNEL_CRED_VERSION;
    DWORD           cCreds;
    PCCERT_CONTEXT* paCred;
    HCERTSTORE      hRootStore;
    DWORD           cMappers;
    _HMAPPER**      aphMappers;
    DWORD           cSupportedAlgs;
    ALG_ID*         palgSupportedAlgs;
    DWORD           grbitEnabledProtocols;
    DWORD           dwMinimumCypherStrength;
    DWORD           dwMaximumCypherStrength;
    DWORD           dwSessionLifespan;
    DWORD           dwFlags;
    DWORD           reserved;
}
alias SCHANNEL_CRED* PSCHANNEL_CRED;

struct SecPkgCred_SupportedAlgs {
    DWORD   cSupportedAlgs;
    ALG_ID* palgSupportedAlgs;
}
alias SecPkgCred_SupportedAlgs* PSecPkgCred_SupportedAlgs;

struct SecPkgCred_CypherStrengths {
    DWORD dwMinimumCypherStrength;
    DWORD dwMaximumCypherStrength;
}
alias SecPkgCred_CypherStrengths* PSecPkgCred_CypherStrengths;

struct SecPkgCred_SupportedProtocols {
    DWORD grbitProtocol;
}
alias SecPkgCred_SupportedProtocols* PSecPkgCred_SupportedProtocols;

struct SecPkgContext_IssuerListInfoEx {
    PCERT_NAME_BLOB aIssuers;
    DWORD           cIssuers;
}
alias SecPkgContext_IssuerListInfoEx* PSecPkgContext_IssuerListInfoEx;

struct SecPkgContext_ConnectionInfo {
    DWORD  dwProtocol;
    ALG_ID aiCipher;
    DWORD  dwCipherStrength;
    ALG_ID aiHash;
    DWORD  dwHashStrength;
    ALG_ID aiExch;
    DWORD  dwExchStrength;
}
alias SecPkgContext_ConnectionInfo* PSecPkgContext_ConnectionInfo;