AaltoTLS.SecureSession.ProcessSendChangeCipherSpec C# (CSharp) Метод

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

private ProcessSendChangeCipherSpec ( AsyncHandshakeResult asyncHandshakeResult ) : void
asyncHandshakeResult AsyncHandshakeResult
Результат void
        private void ProcessSendChangeCipherSpec(AsyncHandshakeResult asyncHandshakeResult)
        {
            // Create the change cipher spec protocol packet
            // NOTE: this has to be before recordHandler.ChangeLocalState since it uses the old state
            Record record = new Record(RecordType.ChangeCipherSpec,
                                       _handshakeSession.NegotiatedVersion,
                                       new byte[] { 0x01 });
            _recordHandler.ProcessOutputRecord(record);

            // NOTE: keep this before recordHandler.ChangeLocalState since it may generate masterSecret
            _handshakeSession.LocalChangeCipherSpec();

            // Change cipher suite in record handler and handle it in handshake session
            _recordHandler.SetCipherSuite(_handshakeSession.CipherSuite, _handshakeSession.ConnectionState);
            _recordHandler.ChangeLocalState();

            // Send the change cipher spec protocol packet
            _recordStream.BeginSend(new Record[] { record }, new AsyncCallback(SendHandshakeCallback), asyncHandshakeResult);
        }