aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2013-09-10 07:07:43 +0200
committerAndreas Schneider <asn@cryptomilk.org>2013-10-01 14:45:01 +0200
commit685fe1d0b6c6dd6d53f65ee8adc83fbb409b9d4b (patch)
tree1e34b734bca007a93ef7b827444cb41952ec1f74 /src
parente588e2325d7e7f6c856fffaa1353ff690c608ccf (diff)
downloadlibssh-685fe1d0b6c6dd6d53f65ee8adc83fbb409b9d4b.tar.gz
libssh-685fe1d0b6c6dd6d53f65ee8adc83fbb409b9d4b.tar.xz
libssh-685fe1d0b6c6dd6d53f65ee8adc83fbb409b9d4b.zip
session: Try the ecdsa default key first.
Diffstat (limited to 'src')
-rw-r--r--src/session.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/session.c b/src/session.c
index 2d6d09e3..fe11b416 100644
--- a/src/session.c
+++ b/src/session.c
@@ -115,6 +115,17 @@ ssh_session ssh_new(void) {
goto err;
}
+#ifdef HAVE_ECC
+ id = strdup("%d/id_ecdsa");
+ if (id == NULL) {
+ goto err;
+ }
+ rc = ssh_list_append(session->opts.identity, id);
+ if (rc == SSH_ERROR) {
+ goto err;
+ }
+#endif
+
id = strdup("%d/id_rsa");
if (id == NULL) {
goto err;