]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Ahem. Cross-certify the key the user actually asked for.
authorSimon Tatham <anakin@pobox.com>
Mon, 21 Mar 2016 18:59:01 +0000 (18:59 +0000)
committerSimon Tatham <anakin@pobox.com>
Mon, 21 Mar 2016 18:59:01 +0000 (18:59 +0000)
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

diff --git a/ssh.c b/ssh.c
index 99b8687a23c90ac586f6a611c55b780ce68b8397..04fc14b54a22fff50abfb26dffe4fb001b31085b 100644 (file)
--- 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);