System.Net.Security.SslConnectionInfo.SslConnectionInfo C# (CSharp) Method

SslConnectionInfo() public method

public SslConnectionInfo ( SafeSslHandle sslContext ) : Microsoft.Win32.SafeHandles
sslContext SafeSslHandle
return Microsoft.Win32.SafeHandles
        public SslConnectionInfo(SafeSslHandle sslContext)
        {
            string protocolVersion = Interop.Ssl.GetProtocolVersion(sslContext);
            Protocol = (int)MapProtocolVersion(protocolVersion);

            int dataCipherAlg;
            int keyExchangeAlg;
            int dataHashAlg;
            int dataKeySize;
            int dataHashKeySize;

            if (!Interop.Ssl.GetSslConnectionInfo(
                sslContext,
                out dataCipherAlg,
                out keyExchangeAlg,
                out dataHashAlg,
                out dataKeySize,
                out dataHashKeySize))
            {
                throw Interop.OpenSsl.CreateSslException(SR.net_ssl_get_connection_info_failed);
            }

            DataCipherAlg = dataCipherAlg;
            KeyExchangeAlg = keyExchangeAlg;
            DataHashAlg = dataHashAlg;
            DataKeySize = dataKeySize;
            DataHashKeySize = dataHashKeySize;

            //Openssl does not provide a way to return a exchange key size.
            //It internally does calculate the key size before generating key to exchange
            //It is not a constant (Algorthim specific) either that we can hardcode and return. 
            KeyExchKeySize = 0;
        }

Same methods

SslConnectionInfo::SslConnectionInfo ( SecPkgContext_ConnectionInfo interopConnectionInfo )