1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-06 22:12:47 -05:00

Use strbufs to tidy up SOCKS proxy protocol code.

This commit is contained in:
Simon Tatham
2018-05-24 13:30:16 +01:00
parent 855a6eaadd
commit 8c7eddc9a1
4 changed files with 97 additions and 96 deletions

View File

@ -14,6 +14,7 @@
#include "ssh.h" /* For MD5 support */
#include "network.h"
#include "proxy.h"
#include "marshal.h"
static void hmacmd5_chap(const unsigned char *challenge, int challen,
const char *passwd, unsigned char *response)
@ -36,10 +37,9 @@ static void hmacmd5_chap(const unsigned char *challenge, int challen,
hmacmd5_free_context(hmacmd5_ctx);
}
void proxy_socks5_offerencryptedauth(char *command, int *len)
void proxy_socks5_offerencryptedauth(BinarySink *bs)
{
command[*len] = 0x03; /* CHAP */
(*len)++;
put_byte(bs, 0x03); /* CHAP */
}
int proxy_socks5_handlechap (Proxy_Socket p)