1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-14 17:47:33 -05:00

sshproxy: borrow a Seat for host key and crypto dialogs.

This puts the previous commit's framework to practical use. Now the
main new_connection() passes its Seat ** through to the SshProxy setup
function, which (if the stars align) will actually use it: stash it,
return a TempSeat wrapper on it for the main backend to use in the
interim, and pass through the GUI dialog prompts for host key
confirmation and weak-crypto warnings.

This is unfinished at the UI end: those dialog prompts will now need
to be much clearer about which SSH server they're talking to (since
now there could be two involved), and I haven't made that change yet.

I haven't attempted to deal with get_userpass_input yet, though.
That's much harder, and I'm still working on it.
This commit is contained in:
Simon Tatham
2021-09-13 16:30:59 +01:00
parent 6d272ee007
commit b1d01cd3c7
4 changed files with 71 additions and 54 deletions

View File

@ -395,7 +395,7 @@ static const PlugVtable ProxySocket_plugvt = {
Socket *new_connection(SockAddr *addr, const char *hostname,
int port, bool privport,
bool oobinline, bool nodelay, bool keepalive,
Plug *plug, Conf *conf, LogPolicy *lp)
Plug *plug, Conf *conf, LogPolicy *lp, Seat **seat)
{
int type = conf_get_int(conf, CONF_proxy_type);
@ -411,7 +411,7 @@ Socket *new_connection(SockAddr *addr, const char *hostname,
if (type == PROXY_SSH &&
(sret = sshproxy_new_connection(addr, hostname, port, privport,
oobinline, nodelay, keepalive,
plug, conf, lp)) != NULL)
plug, conf, lp, seat)) != NULL)
return sret;
if ((sret = platform_new_connection(addr, hostname, port, privport,