| 1 | 
 #ifndef _SCHANNEL_H | 
 
 
 
 
 
 | 2 | 
 #define _SCHANNEL_H | 
 
 
 
 
 
 | 3 | 
 #if __GNUC__ >=3 | 
 
 
 
 
 
 | 4 | 
 #pragma GCC system_header | 
 
 
 
 
 
 | 5 | 
 #endif | 
 
 
 
 
 
 | 6 | 
  | 
 
 
 
 
 
 | 7 | 
 #include <wincrypt.h> | 
 
 
 
 
 
 | 8 | 
  | 
 
 
 
 
 
 | 9 | 
 #ifdef __cplusplus | 
 
 
 
 
 
 | 10 | 
 extern "C" { | 
 
 
 
 
 
 | 11 | 
 #endif | 
 
 
 
 
 
 | 12 | 
  | 
 
 
 
 
 
 | 13 | 
 #define SCHANNEL_CRED_VERSION 4 | 
 
 
 
 
 
 | 14 | 
 #define SCHANNEL_SHUTDOWN 1 | 
 
 
 
 
 
 | 15 | 
 /* ? Do these belong here or in wincrypt.h */ | 
 
 
 
 
 
 | 16 | 
 #define AUTHTYPE_CLIENT 1 | 
 
 
 
 
 
 | 17 | 
 #define AUTHTYPE_SERVER 2 | 
 
 
 
 
 
 | 18 | 
  | 
 
 
 
 
 
 | 19 | 
 #define SP_PROT_TLS1_CLIENT 128 | 
 
 
 
 
 
 | 20 | 
 #define SP_PROT_TLS1_SERVER 64 | 
 
 
 
 
 
 | 21 | 
 #define SP_PROT_SSL3_CLIENT 32 | 
 
 
 
 
 
 | 22 | 
 #define SP_PROT_SSL3_SERVER 16 | 
 
 
 
 
 
 | 23 | 
 #define SP_PROT_SSL2_CLIENT 8 | 
 
 
 
 
 
 | 24 | 
 #define SP_PROT_SSL2_SERVER 4 | 
 
 
 
 
 
 | 25 | 
 #define SP_PROT_PCT1_SERVER 1 | 
 
 
 
 
 
 | 26 | 
 #define SP_PROT_PCT1_CLIENT 2 | 
 
 
 
 
 
 | 27 | 
  | 
 
 
 
 
 
 | 28 | 
 #define SP_PROT_PCT1 (SP_PROT_PCT1_CLIENT|SP_PROT_PCT1_SERVER) | 
 
 
 
 
 
 | 29 | 
 #define SP_PROT_TLS1 (SP_PROT_TLS1_CLIENT|SP_PROT_TLS1_SERVER) | 
 
 
 
 
 
 | 30 | 
 #define SP_PROT_SSL2 (SP_PROT_SSL2_CLIENT|SP_PROT_SSL2_SERVER) | 
 
 
 
 
 
 | 31 | 
 #define SP_PROT_SSL3 (SP_PROT_SSL3_CLIENT|SP_PROT_SSL3_SERVER) | 
 
 
 
 
 
 | 32 | 
  | 
 
 
 
 
 
 | 33 | 
 #define SCH_CRED_NO_SYSTEM_MAPPER 2 | 
 
 
 
 
 
 | 34 | 
 #define SCH_CRED_NO_SERVERNAME_CHECK 4 | 
 
 
 
 
 
 | 35 | 
 #define SCH_CRED_MANUAL_CRED_VALIDATION 8 | 
 
 
 
 
 
 | 36 | 
 #define SCH_CRED_NO_DEFAULT_CREDS 16 | 
 
 
 
 
 
 | 37 | 
 #define SCH_CRED_AUTO_CRED_VALIDATION 32 | 
 
 
 
 
 
 | 38 | 
 #define SCH_CRED_REVOCATION_CHECK_CHAIN 512 | 
 
 
 
 
 
 | 39 | 
 #define SCH_CRED_REVOCATION_CHECK_END_CERT 256 | 
 
 
 
 
 
 | 40 | 
 #define SCH_CRED_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT 1024 | 
 
 
 
 
 
 | 41 | 
 #define SCH_CRED_IGNORE_NO_REVOCATION_CHECK 2048 | 
 
 
 
 
 
 | 42 | 
 #define SCH_CRED_IGNORE_REVOCATION_OFFLINE 4096 | 
 
 
 
 
 
 | 43 | 
 #define SCH_CRED_USE_DEFAULT_CREDS 64 | 
 
 
 
 
 
 | 44 | 
  | 
 
 
 
 
 
 | 45 | 
 typedef struct _SCHANNEL_CRED { | 
 
 
 
 
 
 | 46 | 
         DWORD dwVersion; | 
 
 
 
 
 
 | 47 | 
         DWORD cCreds; | 
 
 
 
 
 
 | 48 | 
         PCCERT_CONTEXT* paCred; | 
 
 
 
 
 
 | 49 | 
         HCERTSTORE hRootStore; | 
 
 
 
 
 
 | 50 | 
         DWORD cMappers; | 
 
 
 
 
 
 | 51 | 
         struct _HMAPPER** aphMappers; | 
 
 
 
 
 
 | 52 | 
         DWORD cSupportedAlgs; | 
 
 
 
 
 
 | 53 | 
         ALG_ID* palgSupportedAlgs; | 
 
 
 
 
 
 | 54 | 
         DWORD grbitEnabledProtocols; | 
 
 
 
 
 
 | 55 | 
         DWORD dwMinimumCypherStrength; | 
 
 
 
 
 
 | 56 | 
         DWORD dwMaximumCypherStrength; | 
 
 
 
 
 
 | 57 | 
         DWORD dwSessionLifespan; | 
 
 
 
 
 
 | 58 | 
         DWORD dwFlags; | 
 
 
 
 
 
 | 59 | 
         DWORD reserved; | 
 
 
 
 
 
 | 60 | 
 } SCHANNEL_CRED, *PSCHANNEL_CRED; | 
 
 
 
 
 
 | 61 | 
 typedef struct _SecPkgCred_SupportedAlgs { | 
 
 
 
 
 
 | 62 | 
         DWORD cSupportedAlgs; | 
 
 
 
 
 
 | 63 | 
         ALG_ID* palgSupportedAlgs; | 
 
 
 
 
 
 | 64 | 
 } SecPkgCred_SupportedAlgs, *PSecPkgCred_SupportedAlgs; | 
 
 
 
 
 
 | 65 | 
 typedef struct _SecPkgCred_CypherStrengths { | 
 
 
 
 
 
 | 66 | 
         DWORD dwMinimumCypherStrength; | 
 
 
 
 
 
 | 67 | 
         DWORD dwMaximumCypherStrength; | 
 
 
 
 
 
 | 68 | 
 } SecPkgCred_CypherStrengths, *PSecPkgCred_CypherStrengths; | 
 
 
 
 
 
 | 69 | 
 typedef struct _SecPkgCred_SupportedProtocols { | 
 
 
 
 
 
 | 70 | 
         DWORD grbitProtocol; | 
 
 
 
 
 
 | 71 | 
 } SecPkgCred_SupportedProtocols, *PSecPkgCred_SupportedProtocols; | 
 
 
 
 
 
 | 72 | 
 typedef struct _SecPkgContext_IssuerListInfoEx { | 
 
 
 
 
 
 | 73 | 
         PCERT_NAME_BLOB aIssuers; | 
 
 
 
 
 
 | 74 | 
         DWORD cIssuers; | 
 
 
 
 
 
 | 75 | 
 } SecPkgContext_IssuerListInfoEx, *PSecPkgContext_IssuerListInfoEx; | 
 
 
 
 
 
 | 76 | 
 typedef struct _SecPkgContext_ConnectionInfo { | 
 
 
 
 
 
 | 77 | 
         DWORD dwProtocol; | 
 
 
 
 
 
 | 78 | 
         ALG_ID aiCipher; | 
 
 
 
 
 
 | 79 | 
         DWORD dwCipherStrength; | 
 
 
 
 
 
 | 80 | 
         ALG_ID aiHash; | 
 
 
 
 
 
 | 81 | 
         DWORD dwHashStrength; | 
 
 
 
 
 
 | 82 | 
         ALG_ID aiExch; | 
 
 
 
 
 
 | 83 | 
         DWORD dwExchStrength; | 
 
 
 
 
 
 | 84 | 
 } SecPkgContext_ConnectionInfo, *PSecPkgContext_ConnectionInfo; | 
 
 
 
 
 
 | 85 | 
  | 
 
 
 
 
 
 | 86 | 
 #ifdef __cplusplus | 
 
 
 
 
 
 | 87 | 
 } | 
 
 
 
 
 
 | 88 | 
 #endif | 
 
 
 
 
 
 | 89 | 
  | 
 
 
 
 
 
 | 90 | 
 #endif /* _SCHANNEL_H */ |