Only certain types of messages are allowed in that phase.
void SshConnectionPrivate::sendKeepAlivePacket()
{
+ // This type of message is not allowed during key exchange.
+ if (m_keyExchangeState != NoKeyExchange) {
+ m_keepAliveTimer.start();
+ return;
+ }
+
Q_ASSERT(m_lastInvalidMsgSeqNr == InvalidSeqNr);
m_lastInvalidMsgSeqNr = m_sendFacility.nextClientSeqNr();
m_sendFacility.sendInvalidPacket();
SSH_MSG_REQUEST_SUCCESS = 81,
SSH_MSG_REQUEST_FAILURE = 82,
+ // TODO: We currently take no precautions against sending these messages
+ // during a key re-exchange, which is not allowed.
SSH_MSG_CHANNEL_OPEN = 90,
SSH_MSG_CHANNEL_OPEN_CONFIRMATION = 91,
SSH_MSG_CHANNEL_OPEN_FAILURE = 92,