_SecPkgContext_ConnectionInfo structure

The SecPkgContext_ConnectionInfo structure contains protocol and cipher information. This structure is used by the InitializeSecurityContext (Schannel) function.

This attribute is supported only by the Schannel security support provider (SSP).

Syntax

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

Members

dwProtocol

Protocol used to establish this connection. The following table describes the constants valid for this member.

Value Meaning
SP_PROT_TLS1_CLIENT
128 (0x80)
Transport Layer Security 1.0 client-side.
SP_PROT_TLS1_SERVER
64 (0x40)
Transport Layer Security 1.0 server-side.
SP_PROT_SSL3_CLIENT
32 (0x20)
Secure Sockets Layer 3.0 client-side.
SP_PROT_SSL3_SERVER
16 (0x10)
Secure Sockets Layer 3.0 server-side.
SP_PROT_TLS1_1_CLIENT
512 (0x200)
Transport Layer Security 1.1 client-side.
SP_PROT_TLS1_1_SERVER
256 (0x100)
Transport Layer Security 1.1 server-side.
SP_PROT_TLS1_2_CLIENT
2048 (0x800)
Transport Layer Security 1.2 client-side.
SP_PROT_TLS1_2_SERVER
1024 (0x400)
Transport Layer Security 1.2 server-side.
SP_PROT_PCT1_CLIENT
2 (0x2)
Private Communications Technology 1.0 client-side. Obsolete.
SP_PROT_PCT1_SERVER
1 (0x1)
Private Communications Technology 1.0 server-side. Obsolete.
SP_PROT_SSL2_CLIENT
8 (0x8)
Secure Sockets Layer 2.0 client-side. Superseded by SP_PROT_TLS1_CLIENT.
SP_PROT_SSL2_SERVER
4 (0x4)
Secure Sockets Layer 2.0 server-side. Superseded by SP_PROT_TLS1_SERVER.

aiCipher

Algorithm identifier (ALG_ID) for the bulk encryption cipher used by this connection. The following table describes the constants valid for this member.

Value Meaning
CALG_3DES
3DES block encryption algorithm
CALG_AES_128
AES 128-bit encryption algorithm
CALG_AES_256
AES 256-bit encryption algorithm
CALG_DES
DES encryption algorithm
CALG_RC2
RC2 block encryption algorithm
CALG_RC4
RC4 stream encryption algorithm
0 (Zero)
No encryption

dwCipherStrength

Strength of the bulk encryption cipher, in bits. Can be one of the following values: 0, 40, 56, 128, 168, or 256.

aiHash

ALG_ID indicating the hash used for generating Message Authentication Codes (MACs). The following table describes the constants valid for this member.

Value Meaning
CALG_MD5
MD5 hashing algorithm.
CALG_SHA
SHA hashing algorithm.

dwHashStrength

Strength of the hash, in bits: 128 or 160.

aiExch

ALG_ID indicating the key exchange algorithm used to generate the shared master secret. The following table describes the constants valid for this member.

Value Meaning
CALG_RSA_KEYX
RSA key exchange.
CALG_DH_EPHEM
Diffie-Hellman key exchange.

dwExchStrength

Strength of the key exchange, in bits. Typically, this member contains one of the following values: 512, 768, 1024, or 2048.

Requirements

   
Windows version Windows XP [desktop apps only] Windows Server 2003 [desktop apps only]
Header schannel.h