forked from qt-creator/qt-creator
SSH: Add missing check in key exchange reply handler
We claimed to support the diffie-hellman-group14-sha1 protocol, but forgot to actually handle it. Change-Id: I3193997d7270328700486a15a6281ebf8528ed56 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -203,7 +203,8 @@ SshKeyExchangeReply SshIncomingPacket::extractKeyExchangeReply(const QByteArray
|
|||||||
throw SshPacketParseException();
|
throw SshPacketParseException();
|
||||||
getHostKeySpecificReplyData(replyData, hostKeyAlgo, replyData.k_s.mid(k_sOffset));
|
getHostKeySpecificReplyData(replyData, hostKeyAlgo, replyData.k_s.mid(k_sOffset));
|
||||||
|
|
||||||
if (kexAlgo == SshCapabilities::DiffieHellmanGroup1Sha1) {
|
if (kexAlgo == SshCapabilities::DiffieHellmanGroup1Sha1
|
||||||
|
|| kexAlgo == SshCapabilities::DiffieHellmanGroup14Sha1) {
|
||||||
replyData.f = SshPacketParser::asBigInt(m_data, &topLevelOffset);
|
replyData.f = SshPacketParser::asBigInt(m_data, &topLevelOffset);
|
||||||
} else {
|
} else {
|
||||||
QSSH_ASSERT_AND_RETURN_VALUE(kexAlgo.startsWith(SshCapabilities::EcdhKexNamePrefix),
|
QSSH_ASSERT_AND_RETURN_VALUE(kexAlgo.startsWith(SshCapabilities::EcdhKexNamePrefix),
|
||||||
|
Reference in New Issue
Block a user