I am using the following code to query current TLS connection:
SecPkgContext_ConnectionInfo data;
QueryContextAttributes(&myHandle, SECPKG_ATTR_CONNECTION_INFO, &data);
It returns correct structure with all the fields:
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;
as per MSDN documentation: https://learn.microsoft.com/en-us/windows/win32/api/schannel/ns-schannel-secpkgcontext_connectioninfo
However, the field aiExch
has value of 0xAE06 which I guess (from wincrypt.h file) is defined as CALG_ECDH_EPHEM
, but documentation only mention two possible values:
CALG_RSA_KEYX 0xA400 // RSA key exchange
CALG_DH_EPHEM 0xAA02 // Diffie-Hellman key exchange.
Now the questions:
- What is the meaning of 0xAE06 / CALG_ECDH_EPHEM?
- What other values the field
aiExch
can have?