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:
4
proxy.c
4
proxy.c
@ -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,
|
||||
|
Reference in New Issue
Block a user