1 /** 2 * Windows API header module 3 * 4 * Translated from MinGW Windows headers 5 * 6 * Authors: Stewart Gordon 7 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) 8 * Source: $(DRUNTIMESRC core/sys/windows/_schannel.d) 9 */ 10 /// Automatically imported and edited from the druntime module 11 /// core.sys.windows.schannel for the auto-generated win32 package. 12 module win32.schannel; 13 //version (Windows): 14 @system: 15 16 import win32.wincrypt; 17 import win32.windef; 18 19 enum DWORD SCHANNEL_CRED_VERSION = 4; 20 enum SCHANNEL_SHUTDOWN = 1; 21 /* Comment from MinGW 22 ? Do these belong here or in wincrypt.h 23 */ 24 enum : DWORD { 25 AUTHTYPE_CLIENT = 1, 26 AUTHTYPE_SERVER = 2 27 } 28 29 enum DWORD 30 SP_PROT_PCT1_SERVER = 0x01, 31 SP_PROT_PCT1_CLIENT = 0x02, 32 SP_PROT_SSL2_SERVER = 0x04, 33 SP_PROT_SSL2_CLIENT = 0x08, 34 SP_PROT_SSL3_SERVER = 0x10, 35 SP_PROT_SSL3_CLIENT = 0x20, 36 SP_PROT_TLS1_SERVER = 0x40, 37 SP_PROT_TLS1_CLIENT = 0x80, 38 SP_PROT_PCT1 = SP_PROT_PCT1_CLIENT | SP_PROT_PCT1_SERVER, 39 SP_PROT_TLS1 = SP_PROT_TLS1_CLIENT | SP_PROT_TLS1_SERVER, 40 SP_PROT_SSL2 = SP_PROT_SSL2_CLIENT | SP_PROT_SSL2_SERVER, 41 SP_PROT_SSL3 = SP_PROT_SSL3_CLIENT | SP_PROT_SSL3_SERVER; 42 43 enum DWORD 44 SCH_CRED_NO_SYSTEM_MAPPER = 0x0002, 45 SCH_CRED_NO_SERVERNAME_CHECK = 0x0004, 46 SCH_CRED_MANUAL_CRED_VALIDATION = 0x0008, 47 SCH_CRED_NO_DEFAULT_CREDS = 0x0010, 48 SCH_CRED_AUTO_CRED_VALIDATION = 0x0020, 49 SCH_CRED_USE_DEFAULT_CREDS = 0x0040, 50 SCH_CRED_REVOCATION_CHECK_END_CERT = 0x0100, 51 SCH_CRED_REVOCATION_CHECK_CHAIN = 0x0200, 52 SCH_CRED_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT = 0x0400, 53 SCH_CRED_IGNORE_NO_REVOCATION_CHECK = 0x0800, 54 SCH_CRED_IGNORE_REVOCATION_OFFLINE = 0x1000; 55 56 // No definition - presumably an opaque structure 57 struct _HMAPPER; 58 59 struct SCHANNEL_CRED { 60 DWORD dwVersion = SCHANNEL_CRED_VERSION; 61 DWORD cCreds; 62 PCCERT_CONTEXT* paCred; 63 HCERTSTORE hRootStore; 64 DWORD cMappers; 65 _HMAPPER** aphMappers; 66 DWORD cSupportedAlgs; 67 ALG_ID* palgSupportedAlgs; 68 DWORD grbitEnabledProtocols; 69 DWORD dwMinimumCypherStrength; 70 DWORD dwMaximumCypherStrength; 71 DWORD dwSessionLifespan; 72 DWORD dwFlags; 73 DWORD reserved; 74 } 75 alias SCHANNEL_CRED* PSCHANNEL_CRED; 76 77 struct SecPkgCred_SupportedAlgs { 78 DWORD cSupportedAlgs; 79 ALG_ID* palgSupportedAlgs; 80 } 81 alias SecPkgCred_SupportedAlgs* PSecPkgCred_SupportedAlgs; 82 83 struct SecPkgCred_CypherStrengths { 84 DWORD dwMinimumCypherStrength; 85 DWORD dwMaximumCypherStrength; 86 } 87 alias SecPkgCred_CypherStrengths* PSecPkgCred_CypherStrengths; 88 89 struct SecPkgCred_SupportedProtocols { 90 DWORD grbitProtocol; 91 } 92 alias SecPkgCred_SupportedProtocols* PSecPkgCred_SupportedProtocols; 93 94 struct SecPkgContext_IssuerListInfoEx { 95 PCERT_NAME_BLOB aIssuers; 96 DWORD cIssuers; 97 } 98 alias SecPkgContext_IssuerListInfoEx* PSecPkgContext_IssuerListInfoEx; 99 100 struct SecPkgContext_ConnectionInfo { 101 DWORD dwProtocol; 102 ALG_ID aiCipher; 103 DWORD dwCipherStrength; 104 ALG_ID aiHash; 105 DWORD dwHashStrength; 106 ALG_ID aiExch; 107 DWORD dwExchStrength; 108 } 109 alias SecPkgContext_ConnectionInfo* PSecPkgContext_ConnectionInfo;