]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - ssh.c
Move kh2reg.py link from svn to git.
[PuTTY.git] / ssh.c
diff --git a/ssh.c b/ssh.c
index c4c4fb9054e2aa7f2f3dbbbd0aa226e4cb7fa9d8..d8a873005c71119b5f0b13b93c4cd5cbb5e15aba 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -6648,6 +6648,13 @@ static void do_ssh2_transport(Ssh ssh, void *vin, int inlen,
         }
         ssh_pkt_getstring(pktin, &s->sigdata, &s->siglen);
 
+        {
+            const char *err = dh_validate_f(ssh->kex_ctx, s->f);
+            if (err) {
+                bombout(("key exchange reply failed validation: %s", err));
+                crStopV;
+            }
+        }
         s->K = dh_find_K(ssh->kex_ctx, s->f);
 
         /* We assume everything from now on will be quick, and it might