зеркало из https://github.com/github/putty.git
Server prep: reword messages to be client/server agnostic.
Lots of user-facing messages that claim that the 'server' just did something or other unexpected will now need to be issued _by_ the server, when the client does the same unexpected thing. So I've reworded them all to talk about the 'remote side' instead of the 'server', and the SSH-2 key setup messages talk about initialising inbound and outbound crypto primitives rather than client->server and server->client.
This commit is contained in:
Родитель
9fe719f47d
Коммит
21a7ce7a07
|
@ -645,7 +645,7 @@ static void pfd_open_failure(Channel *chan, const char *errtext)
|
|||
PortForwarding *pf = container_of(chan, PortForwarding, chan);
|
||||
|
||||
logeventf(pf->cl->logctx,
|
||||
"Forwarded connection refused by server%s%s",
|
||||
"Forwarded connection refused by remote%s%s",
|
||||
errtext ? ": " : "", errtext ? errtext : "");
|
||||
}
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ static void ssh1_bpp_handle_input(BinaryPacketProtocol *bpp)
|
|||
|
||||
if (s->len < 0 || s->len > 262144) { /* SSH1.5-mandated max size */
|
||||
ssh_sw_abort(s->bpp.ssh,
|
||||
"Extremely large packet length from server suggests"
|
||||
"Extremely large packet length from remote suggests"
|
||||
" data stream corruption");
|
||||
crStopV;
|
||||
}
|
||||
|
@ -246,9 +246,9 @@ static void ssh1_bpp_handle_input(BinaryPacketProtocol *bpp)
|
|||
eof:
|
||||
if (!s->bpp.expect_close) {
|
||||
ssh_remote_error(s->bpp.ssh,
|
||||
"Server unexpectedly closed network connection");
|
||||
"Remote side unexpectedly closed network connection");
|
||||
} else {
|
||||
ssh_remote_eof(s->bpp.ssh, "Server closed network connection");
|
||||
ssh_remote_eof(s->bpp.ssh, "Remote side closed network connection");
|
||||
}
|
||||
return; /* avoid touching s now it's been freed */
|
||||
|
||||
|
|
|
@ -133,9 +133,9 @@ static void ssh2_bare_bpp_handle_input(BinaryPacketProtocol *bpp)
|
|||
eof:
|
||||
if (!s->bpp.expect_close) {
|
||||
ssh_remote_error(s->bpp.ssh,
|
||||
"Server unexpectedly closed network connection");
|
||||
"Remote side unexpectedly closed network connection");
|
||||
} else {
|
||||
ssh_remote_eof(s->bpp.ssh, "Server closed network connection");
|
||||
ssh_remote_eof(s->bpp.ssh, "Remote side closed network connection");
|
||||
}
|
||||
return; /* avoid touching s now it's been freed */
|
||||
|
||||
|
|
13
ssh2bpp.c
13
ssh2bpp.c
|
@ -111,7 +111,7 @@ void ssh2_bpp_new_outgoing_crypto(
|
|||
(ssh2_cipher_alg(s->out.cipher)->flags & SSH_CIPHER_IS_CBC) &&
|
||||
!(s->bpp.remote_bugs & BUG_CHOKES_ON_SSH2_IGNORE));
|
||||
|
||||
bpp_logevent(("Initialised %.200s client->server encryption",
|
||||
bpp_logevent(("Initialised %.200s outbound encryption",
|
||||
ssh2_cipher_alg(s->out.cipher)->text_name));
|
||||
} else {
|
||||
s->out.cipher = NULL;
|
||||
|
@ -122,8 +122,7 @@ void ssh2_bpp_new_outgoing_crypto(
|
|||
s->out.mac = ssh2_mac_new(mac, s->out.cipher);
|
||||
mac->setkey(s->out.mac, mac_key);
|
||||
|
||||
bpp_logevent(("Initialised %.200s client->server"
|
||||
" MAC algorithm%s%s",
|
||||
bpp_logevent(("Initialised %.200s outbound MAC algorithm%s%s",
|
||||
ssh2_mac_alg(s->out.mac)->text_name,
|
||||
etm_mode ? " (in ETM mode)" : "",
|
||||
(s->out.cipher &&
|
||||
|
@ -175,7 +174,7 @@ void ssh2_bpp_new_incoming_crypto(
|
|||
ssh2_cipher_setkey(s->in.cipher, ckey);
|
||||
ssh2_cipher_setiv(s->in.cipher, iv);
|
||||
|
||||
bpp_logevent(("Initialised %.200s server->client encryption",
|
||||
bpp_logevent(("Initialised %.200s inbound encryption",
|
||||
ssh2_cipher_alg(s->in.cipher)->text_name));
|
||||
} else {
|
||||
s->in.cipher = NULL;
|
||||
|
@ -185,7 +184,7 @@ void ssh2_bpp_new_incoming_crypto(
|
|||
s->in.mac = ssh2_mac_new(mac, s->in.cipher);
|
||||
mac->setkey(s->in.mac, mac_key);
|
||||
|
||||
bpp_logevent(("Initialised %.200s server->client MAC algorithm%s%s",
|
||||
bpp_logevent(("Initialised %.200s inbound MAC algorithm%s%s",
|
||||
ssh2_mac_alg(s->in.mac)->text_name,
|
||||
etm_mode ? " (in ETM mode)" : "",
|
||||
(s->in.cipher &&
|
||||
|
@ -628,9 +627,9 @@ static void ssh2_bpp_handle_input(BinaryPacketProtocol *bpp)
|
|||
eof:
|
||||
if (!s->bpp.expect_close) {
|
||||
ssh_remote_error(s->bpp.ssh,
|
||||
"Server unexpectedly closed network connection");
|
||||
"Remote side unexpectedly closed network connection");
|
||||
} else {
|
||||
ssh_remote_eof(s->bpp.ssh, "Server closed network connection");
|
||||
ssh_remote_eof(s->bpp.ssh, "Remote side closed network connection");
|
||||
}
|
||||
return; /* avoid touching s now it's been freed */
|
||||
|
||||
|
|
|
@ -319,7 +319,7 @@ int ssh2_common_filter_queue(PacketProtocolLayer *ppl)
|
|||
msg = get_string(pktin);
|
||||
|
||||
ssh_remote_error(
|
||||
ppl->ssh, "Server sent disconnect message\n"
|
||||
ppl->ssh, "Remote side sent disconnect message\n"
|
||||
"type %d (%s):\n\"%.*s\"", reason,
|
||||
((reason > 0 && reason < lenof(ssh2_disconnect_reasons)) ?
|
||||
ssh2_disconnect_reasons[reason] : "unknown"),
|
||||
|
@ -1400,7 +1400,7 @@ static void ssh2_transport_process_queue(PacketProtocolLayer *ppl)
|
|||
return;
|
||||
}
|
||||
pq_push_front(s->ppl.in_pq, pktin);
|
||||
ppl_logevent(("Server initiated key re-exchange"));
|
||||
ppl_logevent(("Remote side initiated key re-exchange"));
|
||||
s->rekey_class = RK_SERVER;
|
||||
}
|
||||
|
||||
|
@ -1445,7 +1445,7 @@ static void ssh2_transport_process_queue(PacketProtocolLayer *ppl)
|
|||
* rekey, we process it anyway!)
|
||||
*/
|
||||
if ((s->ppl.remote_bugs & BUG_SSH2_REKEY)) {
|
||||
ppl_logevent(("Server bug prevents key re-exchange (%s)",
|
||||
ppl_logevent(("Remote bug prevents key re-exchange (%s)",
|
||||
s->rekey_reason));
|
||||
/* Reset the counters, so that at least this message doesn't
|
||||
* hit the event log _too_ often. */
|
||||
|
|
|
@ -392,7 +392,7 @@ void ssh_verstring_handle_input(BinaryPacketProtocol *bpp)
|
|||
|
||||
eof:
|
||||
ssh_remote_error(s->bpp.ssh,
|
||||
"Server unexpectedly closed network connection");
|
||||
"Remote side unexpectedly closed network connection");
|
||||
return; /* avoid touching s now it's been freed */
|
||||
|
||||
crFinishV;
|
||||
|
|
Загрузка…
Ссылка в новой задаче