mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-16 03:53:01 -05:00
Use sk_set_frozen() to ensure that no data will be accepted from an
SSH connection when we're in the middle of asking the user a dialog-box-type question. Fixes `unix-kex-packet', which has just bitten me when connecting to one of the work Suns. [originally from svn r5071] [this svn revision also touched putty-wishlist]
This commit is contained in:
parent
4e550f96b2
commit
88c52fa85f
22
ssh.c
22
ssh.c
@ -2834,8 +2834,11 @@ static int do_ssh1_login(Ssh ssh, unsigned char *in, int inlen,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Warn about chosen cipher if necessary. */
|
/* Warn about chosen cipher if necessary. */
|
||||||
if (warn)
|
if (warn) {
|
||||||
|
sk_set_frozen(ssh->s, 1);
|
||||||
askalg(ssh->frontend, "cipher", cipher_string);
|
askalg(ssh->frontend, "cipher", cipher_string);
|
||||||
|
sk_set_frozen(ssh->s, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (s->cipher_type) {
|
switch (s->cipher_type) {
|
||||||
@ -4889,9 +4892,12 @@ static int do_ssh2_transport(Ssh ssh, unsigned char *in, int inlen,
|
|||||||
ssh->kex = k;
|
ssh->kex = k;
|
||||||
}
|
}
|
||||||
if (ssh->kex) {
|
if (ssh->kex) {
|
||||||
if (s->warn)
|
if (s->warn) {
|
||||||
|
sk_set_frozen(ssh->s, 1);
|
||||||
askalg(ssh->frontend, "key-exchange algorithm",
|
askalg(ssh->frontend, "key-exchange algorithm",
|
||||||
ssh->kex->name);
|
ssh->kex->name);
|
||||||
|
sk_set_frozen(ssh->s, 0);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4922,9 +4928,12 @@ static int do_ssh2_transport(Ssh ssh, unsigned char *in, int inlen,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (s->cscipher_tobe) {
|
if (s->cscipher_tobe) {
|
||||||
if (s->warn)
|
if (s->warn) {
|
||||||
|
sk_set_frozen(ssh->s, 1);
|
||||||
askalg(ssh->frontend, "client-to-server cipher",
|
askalg(ssh->frontend, "client-to-server cipher",
|
||||||
s->cscipher_tobe->name);
|
s->cscipher_tobe->name);
|
||||||
|
sk_set_frozen(ssh->s, 0);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4949,9 +4958,12 @@ static int do_ssh2_transport(Ssh ssh, unsigned char *in, int inlen,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (s->sccipher_tobe) {
|
if (s->sccipher_tobe) {
|
||||||
if (s->warn)
|
if (s->warn) {
|
||||||
|
sk_set_frozen(ssh->s, 1);
|
||||||
askalg(ssh->frontend, "server-to-client cipher",
|
askalg(ssh->frontend, "server-to-client cipher",
|
||||||
s->sccipher_tobe->name);
|
s->sccipher_tobe->name);
|
||||||
|
sk_set_frozen(ssh->s, 0);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5108,9 +5120,11 @@ static int do_ssh2_transport(Ssh ssh, unsigned char *in, int inlen,
|
|||||||
*/
|
*/
|
||||||
s->keystr = ssh->hostkey->fmtkey(s->hkey);
|
s->keystr = ssh->hostkey->fmtkey(s->hkey);
|
||||||
s->fingerprint = ssh->hostkey->fingerprint(s->hkey);
|
s->fingerprint = ssh->hostkey->fingerprint(s->hkey);
|
||||||
|
sk_set_frozen(ssh->s, 1);
|
||||||
verify_ssh_host_key(ssh->frontend,
|
verify_ssh_host_key(ssh->frontend,
|
||||||
ssh->savedhost, ssh->savedport, ssh->hostkey->keytype,
|
ssh->savedhost, ssh->savedport, ssh->hostkey->keytype,
|
||||||
s->keystr, s->fingerprint);
|
s->keystr, s->fingerprint);
|
||||||
|
sk_set_frozen(ssh->s, 0);
|
||||||
if (!s->got_session_id) { /* don't bother logging this in rekeys */
|
if (!s->got_session_id) { /* don't bother logging this in rekeys */
|
||||||
logevent("Host key fingerprint is:");
|
logevent("Host key fingerprint is:");
|
||||||
logevent(s->fingerprint);
|
logevent(s->fingerprint);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user