Commit 859f1eed authored by Christian Kandeler's avatar Christian Kandeler Committed by Christian Kandeler

SSH: Use better member name and fix wrong comment.

No functional changes.

Change-Id: I94f30dc1d48b5a1508d704530bfa6d8af18de89e
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@theqtcompany.com>
parent c209eb9f
......@@ -176,13 +176,13 @@ static void getHostKeySpecificReplyData(SshKeyExchangeReply &replyData,
quint32 offset = 0;
if (hostKeyAlgo == SshCapabilities::PubKeyDss || hostKeyAlgo == SshCapabilities::PubKeyRsa) {
// DSS: p and q, RSA: e and n
replyData.parameters << SshPacketParser::asBigInt(input, &offset);
replyData.parameters << SshPacketParser::asBigInt(input, &offset);
replyData.hostKeyParameters << SshPacketParser::asBigInt(input, &offset);
replyData.hostKeyParameters << SshPacketParser::asBigInt(input, &offset);
// g and y
if (hostKeyAlgo == SshCapabilities::PubKeyDss) {
replyData.parameters << SshPacketParser::asBigInt(input, &offset);
replyData.parameters << SshPacketParser::asBigInt(input, &offset);
replyData.hostKeyParameters << SshPacketParser::asBigInt(input, &offset);
replyData.hostKeyParameters << SshPacketParser::asBigInt(input, &offset);
}
} else {
QSSH_ASSERT_AND_RETURN(hostKeyAlgo == SshCapabilities::PubKeyEcdsa);
......
......@@ -62,10 +62,10 @@ struct SshKeyExchangeInit
struct SshKeyExchangeReply
{
QByteArray k_s;
QList<Botan::BigInt> parameters; // DSS: p, q, g, y. RSA: e, n.
QList<Botan::BigInt> hostKeyParameters; // DSS: p, q, g, y. RSA: e, n.
QByteArray q; // For ECDSA host keys only.
Botan::BigInt f; // For DH only.
QByteArray q_s; // For ECDH only.
QByteArray q; // For ECDH only.
QByteArray signatureBlob;
};
......
......@@ -203,14 +203,14 @@ void SshKeyExchange::sendNewKeysPacket(const SshIncomingPacket &dhReply,
QScopedPointer<Public_Key> sigKey;
if (m_serverHostKeyAlgo == SshCapabilities::PubKeyDss) {
const DL_Group group(reply.parameters.at(0), reply.parameters.at(1),
reply.parameters.at(2));
const DL_Group group(reply.hostKeyParameters.at(0), reply.hostKeyParameters.at(1),
reply.hostKeyParameters.at(2));
DSA_PublicKey * const dsaKey
= new DSA_PublicKey(group, reply.parameters.at(3));
= new DSA_PublicKey(group, reply.hostKeyParameters.at(3));
sigKey.reset(dsaKey);
} else if (m_serverHostKeyAlgo == SshCapabilities::PubKeyRsa) {
RSA_PublicKey * const rsaKey
= new RSA_PublicKey(reply.parameters.at(1), reply.parameters.at(0));
= new RSA_PublicKey(reply.hostKeyParameters.at(1), reply.hostKeyParameters.at(0));
sigKey.reset(rsaKey);
} else {
QSSH_ASSERT_AND_RETURN(m_serverHostKeyAlgo == SshCapabilities::PubKeyEcdsa);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment