Skip to content

Commit

Permalink
Add missing check for failure to agree a host key algorithm.
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.tartarus.org/sgt/putty@9557 cda61777-01e9-0310-a592-d414129be87e
  • Loading branch information
simon committed Jun 4, 2012
1 parent 8482e68 commit b8229ea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ssh.c
Expand Up @@ -5778,6 +5778,12 @@ static int do_ssh2_transport(Ssh ssh, void *vin, int inlen,
break;
}
}
if (!ssh->hostkey) {
bombout(("Couldn't agree a host key algorithm (available: %s)",
str ? str : "(null)"));
crStop(0);
}

s->guessok = s->guessok &&
first_in_commasep_string(hostkey_algs[0]->name, str, len);
ssh_pkt_getstring(pktin, &str, &len); /* client->server cipher */
Expand Down

0 comments on commit b8229ea

Please sign in to comment.