diff options
author | 2011-01-04 20:44:13 +0000 | |
---|---|---|
committer | 2011-01-04 20:44:13 +0000 | |
commit | 8fc79e6855d8c62afa58c4241cde04f8e15c9785 (patch) | |
tree | 1c573f6ffe390ca1fe7a14116306574ec09d34e7 /usr.bin/ssh/ssh-keyscan.c | |
parent | in arc4_stir() only grab 64 bytes from the MD5 output. Grabbing more (diff) | |
download | wireguard-openbsd-8fc79e6855d8c62afa58c4241cde04f8e15c9785.tar.xz wireguard-openbsd-8fc79e6855d8c62afa58c4241cde04f8e15c9785.zip |
handle ecdsa-sha2 with various key lengths; hint and ok djm@
Diffstat (limited to 'usr.bin/ssh/ssh-keyscan.c')
-rw-r--r-- | usr.bin/ssh/ssh-keyscan.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/ssh/ssh-keyscan.c b/usr.bin/ssh/ssh-keyscan.c index 8acca49413b..cea4da54fd3 100644 --- a/usr.bin/ssh/ssh-keyscan.c +++ b/usr.bin/ssh/ssh-keyscan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keyscan.c,v 1.83 2010/08/31 11:54:45 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>. * @@ -231,7 +231,8 @@ 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; @@ -558,7 +559,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(); |