Org.BouncyCastle.Crypto.Tls.TlsProtocolHandler.ProcessChangeCipherSpec C# (CSharp) Метод

ProcessChangeCipherSpec() приватный Метод

private ProcessChangeCipherSpec ( ) : void
Результат void
        private void ProcessChangeCipherSpec()
        {
            while (changeCipherSpecQueue.Available > 0)
            {
                /*
                 * A change cipher spec message is only one byte with the value 1.
                 */
                byte[] b = new byte[1];
                changeCipherSpecQueue.Read(b, 0, 1, 0);
                changeCipherSpecQueue.RemoveData(1);
                if (b[0] != 1)
                {
                    /*
                    * This should never happen.
                    */
                    this.FailWithError(AlertLevel.fatal, AlertDescription.unexpected_message);
                }

                /*
                 * Check if we are in the correct connection state.
                 */
                if (this.connection_state != CS_CLIENT_FINISHED_SEND)
                {
                    this.FailWithError(AlertLevel.fatal, AlertDescription.handshake_failure);
                }

                rs.ServerClientSpecReceived();

                this.connection_state = CS_SERVER_CHANGE_CIPHER_SPEC_RECEIVED;
            }
        }