aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2012-02-04 22:08:55 +0100
committerAndreas Schneider <asn@cryptomilk.org>2012-02-04 22:08:55 +0100
commitc209c6d5ac5da423956c2f04a1c625e2a4221675 (patch)
treefba09ae67d475ab7ce1741638e085e7f38ff70ff
parentb136a986a07b58ed5ee639940d045603fe7e6b3b (diff)
downloadlibssh-c209c6d5ac5da423956c2f04a1c625e2a4221675.tar.gz
libssh-c209c6d5ac5da423956c2f04a1c625e2a4221675.tar.xz
libssh-c209c6d5ac5da423956c2f04a1c625e2a4221675.zip
kex: Add support for ecdsa hostkeys.
-rw-r--r--src/kex.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/kex.c b/src/kex.c
index 36b083e..781e207 100644
--- a/src/kex.c
+++ b/src/kex.c
@@ -66,15 +66,17 @@
#ifdef HAVE_ECDH
#define KEY_EXCHANGE "ecdh-sha2-nistp256,diffie-hellman-group1-sha1"
+#define HOSTKEYS "ecdsa-sha2-nistp256,ssh-rsa,ssh-dss"
#else
#define KEY_EXCHANGE "diffie-hellman-group1-sha1"
+#define HOSTKEYS "ssh-rsa,ssh-dss"
#endif
#define KEX_METHODS_SIZE 10
static const char *default_methods[] = {
KEY_EXCHANGE,
- "ssh-rsa,ssh-dss",
+ HOSTKEYS,
AES BLOWFISH DES,
AES BLOWFISH DES,
"hmac-sha1",
@@ -88,7 +90,7 @@ static const char *default_methods[] = {
const char *supported_methods[] = {
KEY_EXCHANGE,
- "ssh-rsa,ssh-dss",
+ HOSTKEYS,
AES BLOWFISH DES,
AES BLOWFISH DES,
"hmac-sha1",