From 2d217ec862529029d1d146b7f92a4ac8deee85d9 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Mon, 21 Mar 2016 18:59:01 +0000 Subject: [PATCH] Ahem. Cross-certify the key the user actually asked for. I got momentarily confused between whether the special code (TS_LOCALSTART+i) meant the ith entry in the variable uncert_hostkeys[] array, or the ith entry in the fixed hostkey_algs[] array. Now I think everything agrees on it being the latter. --- ssh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssh.c b/ssh.c index 99b8687a..04fc14b5 100644 --- a/ssh.c +++ b/ssh.c @@ -11469,7 +11469,7 @@ static const struct telnet_special *ssh_get_specials(void *handle) const struct ssh_signkey *alg = hostkey_algs[ssh->uncert_hostkeys[i]]; uncert[0].name = alg->name; - uncert[0].code = TS_LOCALSTART + i; + uncert[0].code = TS_LOCALSTART + ssh->uncert_hostkeys[i]; ADD_SPECIALS(uncert); } ADD_SPECIALS(uncert_end);