]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Fix a mismerge in kex null-pointer checks.
authorSimon Tatham <anakin@pobox.com>
Mon, 22 Jun 2015 18:36:57 +0000 (19:36 +0100)
committerSimon Tatham <anakin@pobox.com>
Mon, 22 Jun 2015 18:36:57 +0000 (19:36 +0100)
I removed a vital line of code while fixing the merge conflicts when
cherry-picking 1eb578a488a71284d6b18e46df301e54805f2c35 as
26fe1e26c0f7ab42440332882295667d4a0ac500, causing Diffie-Hellman key
exchange to be completely broken because the server's host key was
never constructed to verify the signature with. Reinstate it.

ssh.c

diff --git a/ssh.c b/ssh.c
index a37b04416ac50c0f15f73d3cc9230167e6cb2588..a41a576c66ec9d25dd18453c7fcf54c9d0291f14 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -6672,6 +6672,7 @@ static void do_ssh2_transport(Ssh ssh, void *vin, int inlen,
             bombout(("unable to parse key exchange reply packet"));
             crStopV;
         }
+        s->hkey = ssh->hostkey->newkey(s->hostkeydata, s->hostkeylen);
         s->f = ssh2_pkt_getmp(pktin);
         if (!s->f) {
             bombout(("unable to parse key exchange reply packet"));