summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2018-10-11 03:48:04 +0000
committerDamien Miller <djm@mindrot.org>2018-10-12 09:43:30 +1100
commit1a4a9cf80f5b92b9d1dadd0bfa8867c04d195391 (patch)
treea8dafb5ee6765ee38dca0893ac0c1fd6b142d6c2
parentdc8ddcdf1a95e011c263486c25869bb5bf4e30ec (diff)
upstream: don't send new-style rsa-sha2-*-cert-v01@openssh.com names to
older OpenSSH that can't handle them. spotted by Adam Eijdenberg; ok dtucker OpenBSD-Commit-ID: 662bbc402e3d7c9b6c322806269698106a6ae631
-rw-r--r--sshconnect2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sshconnect2.c b/sshconnect2.c
index 86a0254be..1675f3935 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect2.c,v 1.287 2018/09/14 05:26:27 djm Exp $ */ 1/* $OpenBSD: sshconnect2.c,v 1.288 2018/10/11 03:48:04 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2008 Damien Miller. All rights reserved. 4 * Copyright (c) 2008 Damien Miller. All rights reserved.
@@ -1088,7 +1088,8 @@ key_sig_algorithm(struct ssh *ssh, const struct sshkey *key)
1088 * newer (SHA2) algorithms. 1088 * newer (SHA2) algorithms.
1089 */ 1089 */
1090 if (ssh == NULL || ssh->kex->server_sig_algs == NULL || 1090 if (ssh == NULL || ssh->kex->server_sig_algs == NULL ||
1091 (key->type != KEY_RSA && key->type != KEY_RSA_CERT)) { 1091 (key->type != KEY_RSA && key->type != KEY_RSA_CERT) ||
1092 (key->type == KEY_RSA_CERT && (datafellows & SSH_BUG_SIGTYPE))) {
1092 /* Filter base key signature alg against our configuration */ 1093 /* Filter base key signature alg against our configuration */
1093 return match_list(sshkey_ssh_name(key), 1094 return match_list(sshkey_ssh_name(key),
1094 options.pubkey_key_types, NULL); 1095 options.pubkey_key_types, NULL);