mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
d42f1fe96d
It was totally unused. No implementation of the 'closing' method in a
Plug vtable was checking it for any reason at all, except for
ProxySocket which captured it from its client in order to pass on to
its server (which, perhaps after further iterations of ProxySocket,
would have ended up ignoring it similarly). And every caller of
plug_closing set it to 0 (aka false), except for the one in sshproxy.c
which passed true (but it would have made no difference to anyone).
The comment in network.h refers to a FIXME comment which was in
try_send() when that code was written (see winnet.c in commit
7b0e082700
). That FIXME is long gone, replaced by a use of a
toplevel callback. So I think the aim must have been to avoid
re-entrancy when sk_write called try_send which encountered a socket
error and called back to plug_closing - but that's long since fixed by
other means now.
36 lines
888 B
C
36 lines
888 B
C
/*
|
|
* Routines to refuse to do cryptographic interaction with proxies
|
|
* in PuTTY. This is a stub implementation of the same interfaces
|
|
* provided by cproxy.c, for use in PuTTYtel.
|
|
*/
|
|
|
|
#include <assert.h>
|
|
#include <ctype.h>
|
|
#include <string.h>
|
|
|
|
#include "putty.h"
|
|
#include "network.h"
|
|
#include "proxy.h"
|
|
|
|
void proxy_socks5_offerencryptedauth(BinarySink *bs)
|
|
{
|
|
/* For telnet, don't add any new encrypted authentication routines */
|
|
}
|
|
|
|
int proxy_socks5_handlechap (ProxySocket *p)
|
|
{
|
|
|
|
plug_closing(p->plug, "Proxy error: Trying to handle a SOCKS5 CHAP request"
|
|
" in telnet-only build",
|
|
PROXY_ERROR_GENERAL);
|
|
return 1;
|
|
}
|
|
|
|
int proxy_socks5_selectchap(ProxySocket *p)
|
|
{
|
|
plug_closing(p->plug, "Proxy error: Trying to handle a SOCKS5 CHAP request"
|
|
" in telnet-only build",
|
|
PROXY_ERROR_GENERAL);
|
|
return 1;
|
|
}
|