public override ChannelBinding GetChannelBinding(ChannelBindingKind kind)
 {
     if (kind != ChannelBindingKind.Endpoint)
     {
         throw new NotSupportedException(SR.GetString("net_listener_invalid_cbt_type", new object[] { kind.ToString() }));
     }
     return this.request.GetChannelBinding();
 }
 public override ChannelBinding GetChannelBinding(ChannelBindingKind kind)
 {
     if (kind != ChannelBindingKind.Endpoint)
     {
         throw new NotSupportedException(SR.Format(
             SR.net_listener_invalid_cbt_type, kind.ToString()));
     }
     return _request.GetChannelBinding();
 }
Example #3
0
        internal static SafeFreeContextBufferChannelBinding QueryContextChannelBinding(SSPIInterface SecModule, SafeDeleteContext securityContext, ChannelBindingKind contextAttribute)
        {
            GlobalLog.Enter("QueryContextChannelBinding", contextAttribute.ToString());

            SafeFreeContextBufferChannelBinding result;

            int errorCode = SecModule.QueryContextChannelBinding(securityContext, contextAttribute, out result);

            if (result != null)
            {
                GlobalLog.Leave("QueryContextChannelBinding", Logging.HashString(result));
            }

            return(result);
        }
            public override ChannelBinding GetChannelBinding(ChannelBindingKind kind)
            {
                if (kind != ChannelBindingKind.Endpoint)
                {
                    throw new NotSupportedException(SR.Format(SR.net_listener_invalid_cbt_type, kind.ToString()));
                }

                return(null);
            }
Example #5
0
        internal ChannelBinding GetChannelBinding(ChannelBindingKind kind)
        {
            GlobalLog.Enter("ConnectStream#" + ValidationHelper.HashString(this) + "::GetChannelBinding", kind.ToString());

            ChannelBinding binding = null;
            TlsStream tlsStream = m_Connection.NetworkStream as TlsStream;

            if (tlsStream != null)
            {
                binding = tlsStream.GetChannelBinding(kind);
            }

            GlobalLog.Leave("ConnectStream#" + ValidationHelper.HashString(this) + "::GetChannelBinding", ValidationHelper.HashString(binding));
            return binding;
        }
Example #6
0
        internal ChannelBinding GetChannelBinding(ChannelBindingKind kind)
        {
            GlobalLog.Enter("SecureChannel#" + ValidationHelper.HashString(this) + "::GetChannelBindingToken", kind.ToString());

            ChannelBinding result = null;
            if (m_SecurityContext != null)
            {
                result = SSPIWrapper.QueryContextChannelBinding(m_SecModule, m_SecurityContext, (ContextAttribute)kind);
            }

            GlobalLog.Leave("SecureChannel#" + ValidationHelper.HashString(this) + "::GetChannelBindingToken", ValidationHelper.HashString(result));
            return result;
        }
Example #7
0
        internal ChannelBinding GetChannelBinding(ChannelBindingKind kind)
        {
            if (GlobalLog.IsEnabled)
            {
                GlobalLog.Enter("SecureChannel#" + LoggingHash.HashString(this) + "::GetChannelBindingToken", kind.ToString());
            }

            ChannelBinding result = null;
            if (_securityContext != null)
            {
                result = SslStreamPal.QueryContextChannelBinding(_securityContext, kind);
            }

            if (GlobalLog.IsEnabled)
            {
                GlobalLog.Leave("SecureChannel#" + LoggingHash.HashString(this) + "::GetChannelBindingToken", LoggingHash.HashString(result));
            }
            return result;
        }
Example #8
0
        internal ChannelBinding GetChannelBinding(ChannelBindingKind kind)
        {
            GlobalLog.Enter("SecureChannel#" + Logging.HashString(this) + "::GetChannelBindingToken", kind.ToString());

            ChannelBinding result = null;
            if (_securityContext != null)
            {
                result = SSPIWrapper.QueryContextChannelBinding(GlobalSSPI.SSPISecureChannel, _securityContext, kind);
            }

            GlobalLog.Leave("SecureChannel#" + Logging.HashString(this) + "::GetChannelBindingToken", Logging.HashString(result));
            return result;
        }
Example #9
0
        internal static SafeFreeContextBufferChannelBinding QueryContextChannelBinding(SSPIInterface SecModule, SafeDeleteContext securityContext, ChannelBindingKind contextAttribute)
        {
            GlobalLog.Enter("QueryContextChannelBinding", contextAttribute.ToString());

            SafeFreeContextBufferChannelBinding result;
            
            int errorCode = SecModule.QueryContextChannelBinding(securityContext, contextAttribute , out result);

            if (result != null)
            {
                GlobalLog.Leave("QueryContextChannelBinding", Logging.HashString(result));
            }

            return result;
        }
Example #10
0
        internal ChannelBinding GetChannelBinding(ChannelBindingKind kind)
        {
            GlobalLog.Enter("SecureChannel#" + Logging.HashString(this) + "::GetChannelBindingToken", kind.ToString());

            ChannelBinding result = null;

            if (_securityContext != null)
            {
                result = SslStreamPal.QueryContextChannelBinding(_securityContext, kind);
            }

            GlobalLog.Leave("SecureChannel#" + Logging.HashString(this) + "::GetChannelBindingToken", Logging.HashString(result));
            return(result);
        }
Example #11
0
 public override ChannelBinding GetChannelBinding(ChannelBindingKind kind)
 {
     if (kind != ChannelBindingKind.Endpoint)
     {
         throw new NotSupportedException(SR.GetString("net_listener_invalid_cbt_type", new object[] { kind.ToString() }));
     }
     return(this.request.GetChannelBinding());
 }