summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2019-07-12 04:08:39 +0000
committerDamien Miller <djm@mindrot.org>2019-07-12 14:09:52 +1000
commit7250879c72d28275a53f2f220e49646c3e42ef18 (patch)
treed0019317d2873436abb92ee8eaef7f4850b33a5a
parenta0876bd994cab9ba6e47ba2a163a4417c7597487 (diff)
upstream: include SHA2-variant RSA key algorithms in KEX proposal;
allows ssh-keyscan to harvest keys from servers that disable olde SHA1 ssh-rsa. bz#3029 from Jakub Jelen OpenBSD-Commit-ID: 9f95ebf76a150c2f727ca4780fb2599d50bbab7a
-rw-r--r--ssh-keyscan.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ssh-keyscan.c b/ssh-keyscan.c
index d95ba1b37..d383b57b9 100644
--- a/ssh-keyscan.c
+++ b/ssh-keyscan.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keyscan.c,v 1.128 2019/06/28 13:35:04 deraadt Exp $ */ 1/* $OpenBSD: ssh-keyscan.c,v 1.129 2019/07/12 04:08:39 djm Exp $ */
2/* 2/*
3 * Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>. 3 * Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>.
4 * 4 *
@@ -233,7 +233,12 @@ keygrab_ssh2(con *c)
233 break; 233 break;
234 case KT_RSA: 234 case KT_RSA:
235 myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = get_cert ? 235 myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = get_cert ?
236 "ssh-rsa-cert-v01@openssh.com" : "ssh-rsa"; 236 "rsa-sha2-512-cert-v01@openssh.com,"
237 "rsa-sha2-256-cert-v01@openssh.com,"
238 "ssh-rsa-cert-v01@openssh.com" :
239 "rsa-sha2-512,"
240 "rsa-sha2-256,"
241 "ssh-rsa";
237 break; 242 break;
238 case KT_ED25519: 243 case KT_ED25519:
239 myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = get_cert ? 244 myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = get_cert ?