summaryrefslogtreecommitdiff
path: root/src/libs/utils/ssh/sshoutgoingpacket.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@nokia.com>2011-04-28 10:57:17 +0200
committerChristian Kandeler <christian.kandeler@nokia.com>2011-04-28 11:22:08 +0200
commit9d90809e6db7889a0a0a46f2eaa67bc08448358b (patch)
tree7f44457194d50cacb01a3ff2344f26daa974f0b2 /src/libs/utils/ssh/sshoutgoingpacket.cpp
parentc5a40e9e6306a6b45d9ad6e235f1cfbeeee2c61f (diff)
downloadqt-creator-9d90809e6db7889a0a0a46f2eaa67bc08448358b.tar.gz
SSH: Fix key re-exchange bug.
We used the encrypted client payload by mistake. The bug only manifests itself from the second key exchange on, because during the first one, no encryption is active, so the "encrypted" payload is the same as the non-encrypted one.
Diffstat (limited to 'src/libs/utils/ssh/sshoutgoingpacket.cpp')
-rw-r--r--src/libs/utils/ssh/sshoutgoingpacket.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libs/utils/ssh/sshoutgoingpacket.cpp b/src/libs/utils/ssh/sshoutgoingpacket.cpp
index 8983ca4c70..2604b90072 100644
--- a/src/libs/utils/ssh/sshoutgoingpacket.cpp
+++ b/src/libs/utils/ssh/sshoutgoingpacket.cpp
@@ -55,7 +55,7 @@ quint32 SshOutgoingPacket::macLength() const
return m_encrypter.macLength();
}
-void SshOutgoingPacket::generateKeyExchangeInitPacket()
+QByteArray SshOutgoingPacket::generateKeyExchangeInitPacket()
{
const QByteArray &supportedkeyExchangeMethods
= encodeNameList(SshCapabilities::KeyExchangeMethods);
@@ -81,7 +81,9 @@ void SshOutgoingPacket::generateKeyExchangeInitPacket()
m_data.append(supportedLanguages).append(supportedLanguages);
appendBool(false); // No guessed packet.
m_data.append(QByteArray(4, 0)); // Reserved.
+ QByteArray payload = m_data.mid(PayloadOffset);
finalize();
+ return payload;
}
void SshOutgoingPacket::generateKeyDhInitPacket(const Botan::BigInt &e)