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

Promote ssh2_userauth_antispoof_msg into utils.

It doesn't actually do anything specific to the userauth layer; it's
just a helper function that deals with the mechanics of printing an
unspoofable message on various kinds of front end, and the only
parameters it needs are a Seat and a message.

Currently, it's used for 'here is the start/end of the server banner'
only. But it's also got all the right functionality to be used for the
(still missing) messages about which proxy SSH server the next set of
login prompts are going to refer to.
This commit is contained in:
Simon Tatham
2021-09-16 11:43:02 +01:00
parent adf6b698e4
commit fb663d4761
4 changed files with 43 additions and 37 deletions

View File

@ -1250,6 +1250,10 @@ static inline size_t seat_banner(Seat *seat, const void *data, size_t len)
static inline size_t seat_banner_pl(Seat *seat, ptrlen data)
{ return seat_output(seat, SEAT_OUTPUT_AUTH_BANNER, data.ptr, data.len); }
/* In the utils subdir: print a message to the Seat which can't be
* spoofed by server-supplied auth-time output such as SSH banners */
void seat_antispoof_msg(Seat *seat, const char *msg);
/*
* Stub methods for seat implementations that want to use the obvious
* null handling for a given method.