summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/ssh-keyscan.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2011-05-04 07:34:44 +0000
committerdes <des@FreeBSD.org>2011-05-04 07:34:44 +0000
commitee2afa8165baec284a83500803978f8a0e645ccd (patch)
treea745d3c673d44775cc175961e80d2246eb00e0df /crypto/openssh/ssh-keyscan.c
parentd035dd6f462a261f9b99bfa8545a924b314e1bb5 (diff)
parent1824cfda46b3f11c1c3c4071e80b73ca91553149 (diff)
downloadFreeBSD-src-ee2afa8165baec284a83500803978f8a0e645ccd.zip
FreeBSD-src-ee2afa8165baec284a83500803978f8a0e645ccd.tar.gz
Upgrade to OpenSSH 5.8p2.
Diffstat (limited to 'crypto/openssh/ssh-keyscan.c')
-rw-r--r--crypto/openssh/ssh-keyscan.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/crypto/openssh/ssh-keyscan.c b/crypto/openssh/ssh-keyscan.c
index b6cf427..25d7ac6 100644
--- a/crypto/openssh/ssh-keyscan.c
+++ b/crypto/openssh/ssh-keyscan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keyscan.c,v 1.82 2010/06/22 04:54:30 djm Exp $ */
+/* $OpenBSD: ssh-keyscan.c,v 1.84 2011/01/04 20:44:13 otto Exp $ */
/*
* Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>.
*
@@ -52,9 +52,10 @@ int IPv4or6 = AF_UNSPEC;
int ssh_port = SSH_DEFAULT_PORT;
-#define KT_RSA1 1
-#define KT_DSA 2
-#define KT_RSA 4
+#define KT_RSA1 1
+#define KT_DSA 2
+#define KT_RSA 4
+#define KT_ECDSA 8
int get_keytypes = KT_RSA; /* Get only RSA keys by default */
@@ -245,12 +246,14 @@ keygrab_ssh2(con *c)
packet_set_connection(c->c_fd, c->c_fd);
enable_compat20();
myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = c->c_keytype == KT_DSA?
- "ssh-dss": "ssh-rsa";
+ "ssh-dss" : (c->c_keytype == KT_RSA ? "ssh-rsa" :
+ "ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521");
c->c_kex = kex_setup(myproposal);
c->c_kex->kex[KEX_DH_GRP1_SHA1] = kexdh_client;
c->c_kex->kex[KEX_DH_GRP14_SHA1] = kexdh_client;
c->c_kex->kex[KEX_DH_GEX_SHA1] = kexgex_client;
c->c_kex->kex[KEX_DH_GEX_SHA256] = kexgex_client;
+ c->c_kex->kex[KEX_ECDH_SHA2] = kexecdh_client;
c->c_kex->verify_host_key = hostjump;
if (!(j = setjmp(kexjmp))) {
@@ -571,7 +574,7 @@ do_host(char *host)
if (name == NULL)
return;
- for (j = KT_RSA1; j <= KT_RSA; j *= 2) {
+ for (j = KT_RSA1; j <= KT_ECDSA; j *= 2) {
if (get_keytypes & j) {
while (ncon >= MAXCON)
conloop();
@@ -673,6 +676,9 @@ main(int argc, char **argv)
case KEY_DSA:
get_keytypes |= KT_DSA;
break;
+ case KEY_ECDSA:
+ get_keytypes |= KT_ECDSA;
+ break;
case KEY_RSA:
get_keytypes |= KT_RSA;
break;
OpenPOWER on IntegriCloud