private void ProcessNEWKEYS(DataFragment packet) {
            //confirms new key
            if(packet.Length!=1 || packet.ByteAt(0)!=(byte)PacketType.SSH_MSG_NEWKEYS) {
                Monitor.Exit(_connection);
                throw new SSHException("SSH_MSG_NEWKEYS failed");
            }

            _connection.RefreshKeys(_sessionID, _tc, _rc, _tm, _rm);
            Monitor.Exit(_connection);
            TraceReceptionNegotiation(PacketType.SSH_MSG_NEWKEYS, "the keys are refreshed");
            _status = Status.FINISHED;
        }
Exemple #2
0
 private bool IsMsgNewKeys(DataFragment packet)
 {
     return packet.Length >= 1 && packet.ByteAt(0) == (byte)PacketType.SSH_MSG_NEWKEYS;
 }
Exemple #3
0
 private PacketType SneakPacketType(DataFragment data)
 {
     return (PacketType)data.ByteAt(0);
 }