1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 11:32:48 -05:00

Give BPPs a Frontend, so they can do their own logging.

The sshverstring quasi-frontend is passed a Frontend pointer at setup
time, so that it can generate Event Log entries containing the local
and remote version strings and the results of remote bug detection.

I'm promoting that field of sshverstring to a field of the public BPP
structure, so now all BPPs have the right to talk directly to the
frontend if they want to. This means I can move all the log messages
of the form 'Initialised so-and-so cipher/MAC/compression' down into
the BPPs themselves, where they can live exactly alongside the actual
initialisation of those primitives.

It also means BPPs will be able to log interesting things they detect
at any point in the packet stream, which is about to come in useful
for another purpose.
This commit is contained in:
Simon Tatham
2018-10-07 08:16:44 +01:00
parent 36caf03a5b
commit 2e7ced6480
9 changed files with 79 additions and 64 deletions

View File

@ -2153,20 +2153,6 @@ static void ssh2_transport_process_queue(PacketProtocolLayer *ppl)
strbuf_free(mac_key);
}
if (s->out.cipher)
ppl_logevent(("Initialised %.200s client->server encryption",
s->out.cipher->text_name));
if (s->out.mac)
ppl_logevent(("Initialised %.200s client->server"
" MAC algorithm%s%s",
s->out.mac->text_name,
s->out.etm_mode ? " (in ETM mode)" : "",
(s->out.cipher->required_mac ?
" (required by cipher)" : "")));
if (s->out.comp->text_name)
ppl_logevent(("Initialised %s compression",
s->out.comp->text_name));
/*
* Now our end of the key exchange is complete, we can send all
* our queued higher-layer packets. Transfer the whole of the next
@ -2222,19 +2208,6 @@ static void ssh2_transport_process_queue(PacketProtocolLayer *ppl)
strbuf_free(mac_key);
}
if (s->in.cipher)
ppl_logevent(("Initialised %.200s server->client encryption",
s->in.cipher->text_name));
if (s->in.mac)
ppl_logevent(("Initialised %.200s server->client MAC algorithm%s%s",
s->in.mac->text_name,
s->in.etm_mode ? " (in ETM mode)" : "",
(s->in.cipher->required_mac ?
" (required by cipher)" : "")));
if (s->in.comp->text_name)
ppl_logevent(("Initialised %s decompression",
s->in.comp->text_name));
/*
* Free shared secret.
*/