System.Net.Security.SslState.CompleteHandshake C# (CSharp) Method

CompleteHandshake() private method

private CompleteHandshake ( ProtocolToken &alertToken ) : bool
alertToken ProtocolToken
return bool
        private bool CompleteHandshake(ref ProtocolToken alertToken)
        {
            if (NetEventSource.IsEnabled) NetEventSource.Enter(this);

            Context.ProcessHandshakeSuccess();

            if (!Context.VerifyRemoteCertificate(_certValidationDelegate, ref alertToken))
            {
                _handshakeCompleted = false;
                _certValidationFailed = true;

                if (NetEventSource.IsEnabled) NetEventSource.Exit(this, false);
                return false;
            }

            _certValidationFailed = false;
            _handshakeCompleted = true;

            if (NetEventSource.IsEnabled) NetEventSource.Exit(this, true);
            return true;
        }