aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/ssh/sshcapabilities.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@theqtcompany.com>2015-06-29 15:37:48 +0200
committerChristian Kandeler <christian.kandeler@theqtcompany.com>2015-06-29 13:42:51 +0000
commitc39977f24525bfeb5115e6aac13829aa8610da4d (patch)
tree801ddcb3263beea1d70d517ab31685e79aa09250 /src/libs/ssh/sshcapabilities.cpp
parent6b2917a208b45c6ec0431346502bac7268f944e3 (diff)
SSH: Fix composition of ECDH key exchange signature.
We need to pad the encoded integers to the full width, so the signature will have the correct length. Change-Id: Ic844a5996ed3d8a121847d09aae1a7782ee2c24c Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'src/libs/ssh/sshcapabilities.cpp')
-rw-r--r--src/libs/ssh/sshcapabilities.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libs/ssh/sshcapabilities.cpp b/src/libs/ssh/sshcapabilities.cpp
index 60dc3e8659..725f01c1a0 100644
--- a/src/libs/ssh/sshcapabilities.cpp
+++ b/src/libs/ssh/sshcapabilities.cpp
@@ -130,5 +130,13 @@ QByteArray SshCapabilities::findBestMatch(const QList<QByteArray> &myCapabilitie
return commonCapabilities(myCapabilities, serverCapabilities).first();
}
+int SshCapabilities::ecdsaIntegerWidthInBytes(const QByteArray &ecdsaAlgo)
+{
+ if (ecdsaAlgo == PubKeyEcdsa256)
+ return 32;
+ throw SshClientException(SshInternalError, SSH_TR("Unexpected ecdsa algorithm \"%1\"")
+ .arg(QString::fromLatin1(ecdsaAlgo)));
+}
+
} // namespace Internal
} // namespace QSsh