Commit 6b2917a2 authored by Christian Kandeler's avatar Christian Kandeler

SSH: Give better name to member variable.

No functional changes.

Change-Id: Ie75fd001c90c2eaaf3c085c92e9ab2279e1fff98
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@theqtcompany.com>
parent 8529f084
......@@ -96,7 +96,7 @@ inline const char *botanEmsaAlgoName(const QByteArray &rfcAlgoName)
return "EMSA1(SHA-1)";
if (rfcAlgoName == SshCapabilities::PubKeyRsa)
return "EMSA3(SHA-1)";
if (rfcAlgoName == SshCapabilities::PubKeyEcdsa)
if (rfcAlgoName == SshCapabilities::PubKeyEcdsa256)
return "EMSA1_BSI(SHA-256)";
throw SshClientException(SshInternalError, SSH_TR("Unexpected host key algorithm \"%1\"")
.arg(QString::fromLatin1(rfcAlgoName)));
......
......@@ -65,9 +65,9 @@ const QList<QByteArray> SshCapabilities::KeyExchangeMethods = QList<QByteArray>(
const QByteArray SshCapabilities::PubKeyDss("ssh-dss");
const QByteArray SshCapabilities::PubKeyRsa("ssh-rsa");
const QByteArray SshCapabilities::PubKeyEcdsa("ecdsa-sha2-nistp256");
const QByteArray SshCapabilities::PubKeyEcdsa256("ecdsa-sha2-nistp256");
const QList<QByteArray> SshCapabilities::PublicKeyAlgorithms = QList<QByteArray>()
<< SshCapabilities::PubKeyEcdsa
<< SshCapabilities::PubKeyEcdsa256
<< SshCapabilities::PubKeyRsa
<< SshCapabilities::PubKeyDss;
......
......@@ -50,7 +50,7 @@ public:
static const QByteArray PubKeyDss;
static const QByteArray PubKeyRsa;
static const QByteArray PubKeyEcdsa;
static const QByteArray PubKeyEcdsa256;
static const QList<QByteArray> PublicKeyAlgorithms;
static const QByteArray CryptAlgo3DesCbc;
......
......@@ -185,7 +185,7 @@ static void getHostKeySpecificReplyData(SshKeyExchangeReply &replyData,
replyData.hostKeyParameters << SshPacketParser::asBigInt(input, &offset);
}
} else {
QSSH_ASSERT_AND_RETURN(hostKeyAlgo == SshCapabilities::PubKeyEcdsa);
QSSH_ASSERT_AND_RETURN(hostKeyAlgo == SshCapabilities::PubKeyEcdsa256);
if (SshPacketParser::asString(input, &offset)
!= hostKeyAlgo.mid(11)) { // Without "ecdsa-sha2-" prefix.
throw SshPacketParseException();
......@@ -221,7 +221,7 @@ SshKeyExchangeReply SshIncomingPacket::extractKeyExchangeReply(const QByteArray
if (SshPacketParser::asString(fullSignature, &sigOffset) != hostKeyAlgo)
throw SshPacketParseException();
replyData.signatureBlob = SshPacketParser::asString(fullSignature, &sigOffset);
if (hostKeyAlgo == SshCapabilities::PubKeyEcdsa) {
if (hostKeyAlgo == SshCapabilities::PubKeyEcdsa256) {
// Botan's PK_Verifier wants the signature in this format.
quint32 blobOffset = 0;
const Botan::BigInt r = SshPacketParser::asBigInt(replyData.signatureBlob, &blobOffset);
......
......@@ -213,7 +213,7 @@ void SshKeyExchange::sendNewKeysPacket(const SshIncomingPacket &dhReply,
= new RSA_PublicKey(reply.hostKeyParameters.at(1), reply.hostKeyParameters.at(0));
sigKey.reset(rsaKey);
} else {
QSSH_ASSERT_AND_RETURN(m_serverHostKeyAlgo == SshCapabilities::PubKeyEcdsa);
QSSH_ASSERT_AND_RETURN(m_serverHostKeyAlgo == SshCapabilities::PubKeyEcdsa256);
const EC_Group domain("secp256r1");
const PointGFp point = OS2ECP(convertByteArray(reply.q), reply.q.count(),
domain.get_curve());
......
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