public static void QueryContextConnectionInfo(SafeDeleteContext securityContext, out SslConnectionInfo connectionInfo)
        {
            var interopConnectionInfo = SSPIWrapper.QueryContextAttributes(
                GlobalSSPI.SSPISecureChannel,
                securityContext,
                Interop.SspiCli.ContextAttribute.SECPKG_ATTR_CONNECTION_INFO) as SecPkgContext_ConnectionInfo;

            connectionInfo = new SslConnectionInfo(interopConnectionInfo);
        }
Beispiel #2
0
        /*++
            ProcessHandshakeSuccess -
               Called on successful completion of Handshake -
               used to set header/trailer sizes for encryption use

            Fills in the information about established protocol
        --*/
        internal void ProcessHandshakeSuccess()
        {
            GlobalLog.Enter("SecureChannel#" + Logging.HashString(this) + "::ProcessHandshakeSuccess");
            StreamSizes streamSizes = SSPIWrapper.QueryContextAttributes(GlobalSSPI.SSPISecureChannel, _securityContext, Interop.Secur32.ContextAttribute.StreamSizes) as StreamSizes;
            if (streamSizes != null)
            {
                try
                {
                    _headerSize = streamSizes.header;
                    _trailerSize = streamSizes.trailer;
                    _maxDataSize = checked(streamSizes.maximumMessage - (_headerSize + _trailerSize));
                }
                catch (Exception e)
                {
                    if (!ExceptionCheck.IsFatal(e))
                    {
                        GlobalLog.Assert(false, "SecureChannel#" + Logging.HashString(this) + "::ProcessHandshakeSuccess", "StreamSizes out of range.");
                    }

                    throw;
                }
            }
            _connectionInfo = SSPIWrapper.QueryContextAttributes(GlobalSSPI.SSPISecureChannel, _securityContext, Interop.Secur32.ContextAttribute.ConnectionInfo) as SslConnectionInfo;
            GlobalLog.Leave("SecureChannel#" + Logging.HashString(this) + "::ProcessHandshakeSuccess");
        }
Beispiel #3
0
 public static void QueryContextConnectionInfo(SafeDeleteContext securityContext, out SslConnectionInfo connectionInfo)
 {
     connectionInfo = new SslConnectionInfo(((SafeDeleteSslContext)securityContext).SslContext);
 }
Beispiel #4
0
 public static void QueryContextConnectionInfo(SafeDeleteContext securityContext, out SslConnectionInfo connectionInfo)
 {
     connectionInfo = new SslConnectionInfo(((SafeDeleteSslContext)securityContext).SslContext);
 }
        public static void QueryContextConnectionInfo(SafeDeleteContext securityContext, out SslConnectionInfo connectionInfo)
        {
            var interopConnectionInfo = SSPIWrapper.QueryContextAttributes(
                GlobalSSPI.SSPISecureChannel,
                securityContext,
                Interop.SspiCli.ContextAttribute.SECPKG_ATTR_CONNECTION_INFO) as SecPkgContext_ConnectionInfo;

            connectionInfo = new SslConnectionInfo(interopConnectionInfo);
        }
Beispiel #6
0
 public static void QueryContextConnectionInfo(
     SafeDeleteSslContext securityContext,
     ref SslConnectionInfo connectionInfo)
 {
     connectionInfo.UpdateSslConnectionInfo(securityContext.SslContext);
 }