public void UpdateSslConnectionInfo(SafeDeleteContext securityContext) { SecPkgContext_ConnectionInfo interopConnectionInfo = default; bool success = SSPIWrapper.QueryBlittableContextAttributes( GlobalSSPI.SSPISecureChannel, securityContext, Interop.SspiCli.ContextAttribute.SECPKG_ATTR_CONNECTION_INFO, ref interopConnectionInfo); Debug.Assert(success); TlsCipherSuite cipherSuite = default; SecPkgContext_CipherInfo cipherInfo = default; success = SSPIWrapper.QueryBlittableContextAttributes(GlobalSSPI.SSPISecureChannel, securityContext, Interop.SspiCli.ContextAttribute.SECPKG_ATTR_CIPHER_INFO, ref cipherInfo); if (success) { cipherSuite = (TlsCipherSuite)cipherInfo.dwCipherSuite; } Protocol = interopConnectionInfo.Protocol; DataCipherAlg = interopConnectionInfo.DataCipherAlg; DataKeySize = interopConnectionInfo.DataKeySize; DataHashAlg = interopConnectionInfo.DataHashAlg; DataHashKeySize = interopConnectionInfo.DataHashKeySize; KeyExchangeAlg = interopConnectionInfo.KeyExchangeAlg; KeyExchKeySize = interopConnectionInfo.KeyExchKeySize; TlsCipherSuite = cipherSuite; ApplicationProtocol = GetNegotiatedApplicationProtocol(securityContext); }
public SslConnectionInfo(SecPkgContext_ConnectionInfo interopConnectionInfo) { Protocol = interopConnectionInfo.Protocol; DataCipherAlg = interopConnectionInfo.DataCipherAlg; DataKeySize = interopConnectionInfo.DataKeySize; DataHashAlg = interopConnectionInfo.DataHashAlg; DataHashKeySize = interopConnectionInfo.DataHashKeySize; KeyExchangeAlg = interopConnectionInfo.KeyExchangeAlg; KeyExchKeySize = interopConnectionInfo.KeyExchKeySize; }
public SslConnectionInfo(SecPkgContext_ConnectionInfo interopConnectionInfo) { Protocol = interopConnectionInfo.Protocol; DataCipherAlg = interopConnectionInfo.DataCipherAlg; DataKeySize = interopConnectionInfo.DataKeySize; DataHashAlg = interopConnectionInfo.DataHashAlg; DataHashKeySize = interopConnectionInfo.DataHashKeySize; KeyExchangeAlg = interopConnectionInfo.KeyExchangeAlg; KeyExchKeySize = interopConnectionInfo.KeyExchKeySize; }
internal SchannelConnectionInfo(SecPkgContext_ConnectionInfo info) { Protocol = (SchannelProtocolType)info.dwProtocol; CipherAlgorithm = (SchannelAlgorithmType)info.aiCipher; CipherStrength = info.dwCipherStrength; HashAlgorithm = (SchannelAlgorithmType)info.aiHash; HashStrength = info.dwHashStrength; ExchangeAlgorithm = (SchannelAlgorithmType)info.aiExch; ExchangeStrength = info.dwExchStrength; }