GetRemoteSecurity() 공개 추상적인 메소드

public abstract GetRemoteSecurity ( ) : SecurityMessageProperty
리턴 SecurityMessageProperty
예제 #1
0
        void SetupSecurityIfNecessary(StreamUpgradeAcceptor upgradeAcceptor)
        {
            StreamSecurityUpgradeAcceptor securityUpgradeAcceptor = upgradeAcceptor as StreamSecurityUpgradeAcceptor;

            if (securityUpgradeAcceptor != null)
            {
                security = securityUpgradeAcceptor.GetRemoteSecurity();
                if (security == null)
                {
                    Exception securityFailedException = new ProtocolException(
                        SR.Format(SR.RemoteSecurityNotNegotiatedOnStreamUpgrade, Via));
                    throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(securityFailedException);
                }
            }
        }
예제 #2
0
            void SetupSecurityIfNecessary()
            {
                StreamSecurityUpgradeAcceptor securityUpgradeAcceptor = upgradeAcceptor as StreamSecurityUpgradeAcceptor;

                if (securityUpgradeAcceptor != null)
                {
                    RemoteSecurity = securityUpgradeAcceptor.GetRemoteSecurity();

                    if (RemoteSecurity == null)
                    {
                        Exception securityFailedException = new ProtocolException(
                            SR.Format(SR.RemoteSecurityNotNegotiatedOnStreamUpgrade, Via));
                        WriteAuditFailure(securityUpgradeAcceptor, securityFailedException);
                        throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(securityFailedException);
                    }
                    else
                    {
                        // Audit Authentication Success
                        // WriteAuditEvent(securityUpgradeAcceptor, AuditLevel.Success, null);
                    }
                }
            }