simon-git: putty (master): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Fri May 25 14:44:19 BST 2018
TL;DR:
1a02274 Fix a Perl warning when mkfiles.pl gets bad input.
7e8ae41 Clean up the crufty old SSH-1 RSA API.
3a9be93 Fix a copy-paste goof in a Pageant error message.
23f3b65 Fix a bad free on portfwd name resolution failure.
2259f3d Fix null deref on writing OpenSSH pubkey with no comment.
58379aa Fix order of primes when Pageant adds an SSH-1 key.
12b38ad New header file 'defs.h'.
bff128f Make strbuf a less opaque type.
0e3082e New centralised binary-data marshalling system.
f1b1b1d Simplify hashing operations in sshrsa.c and sshdss.c.
4988fd4 Replace all uses of SHA*_Bytes / MD5Update.
98dce3b Remove the ssh_pkt_add* functions.
472fddf Clean up the parse_ssh_ttymodes system.
81a04c4 Remove the sftp_pkt_add* functions.
a990738 Use the BinarySink system for conf serialisation.
67de463 Change ssh.h crypto APIs to output to BinarySink.
e27ddf6 Make ssh_hash and ssh_mac expose a BinarySink.
8ce0a67 Use BinarySink to tidy up key export code.
0c44fa8 Build outgoing SSH agent requests in a strbuf.
b6cbad8 Build SSH agent reply messages in a BinarySink.
855a6ea Use strbuf to tidy up sshshare.c.
8c7eddc Use strbufs to tidy up SOCKS proxy protocol code.
Repository: https://git.tartarus.org/simon/putty.git
On the web: https://git.tartarus.org/?p=simon/putty.git
Branch updated: master
Committer: Simon Tatham <anakin at pobox.com>
Date: 2018-05-25 14:44:19
commit 1a022742724e89e02aeab011ec7e5ea9cc8279f8
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=1a022742724e89e02aeab011ec7e5ea9cc8279f8;hp=1bed56cf572a150bdb4c7ae12b362c95901524a1
Author: Simon Tatham <anakin at pobox.com>
Date: Wed May 23 15:14:03 2018 +0100
Fix a Perl warning when mkfiles.pl gets bad input.
If you forget the '+' at the start of a continuation line with only
one word on it, then Perl would test $_[1] before checking that it
even existed to test. The test would give the right answer anyway, but
the warning was annoying.
mkfiles.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
commit 7e8ae41a3f64c5bd7c29ae6154d364a39a205de2
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=7e8ae41a3f64c5bd7c29ae6154d364a39a205de2;hp=1a022742724e89e02aeab011ec7e5ea9cc8279f8
Author: Simon Tatham <anakin at pobox.com>
Date: Thu May 24 08:22:44 2018 +0100
Clean up the crufty old SSH-1 RSA API.
Lots of functions had really generic names (like 'makekey'), or names
that missed out an important concept (like 'rsakey_pubblob', which
loads a public blob from a _file_ and doesn't generate it from an
in-memory representation at all). Also, the opaque 'int order' that
distinguishes the two formats of public key blob is now a mnemonic
enumeration, and while I'm at it, rsa_ssh1_public_blob takes one of
those as an extra argument.
cmdgen.c | 11 ++++++-----
pageant.c | 30 +++++++++++++++++-------------
ssh.c | 31 +++++++++++++++----------------
ssh.h | 39 +++++++++++++++++++++++++--------------
sshpubk.c | 36 +++++++++++++++++++-----------------
sshrsa.c | 34 +++++++++++++++++-----------------
unix/uxpgnt.c | 7 ++++---
windows/winpgen.c | 10 ++++++----
8 files changed, 109 insertions(+), 89 deletions(-)
commit 3a9be93a24abeb9266bedfed46590e70b35cb691
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=3a9be93a24abeb9266bedfed46590e70b35cb691;hp=7e8ae41a3f64c5bd7c29ae6154d364a39a205de2
Author: Simon Tatham <anakin at pobox.com>
Date: Fri May 25 14:01:59 2018 +0100
Fix a copy-paste goof in a Pageant error message.
I never noticed before because it only comes up in the case of an
agent sending back one particular kind of corrupt data, but if the
last-minute check that there's no trailing junk on the end of the
agent's SSH-2 key list fails, it prints an error message erroneously
mentioning SSH-1.
pageant.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 23f3b651818932d5e7fd5d87a3b366b75cf845c2
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=23f3b651818932d5e7fd5d87a3b366b75cf845c2;hp=3a9be93a24abeb9266bedfed46590e70b35cb691
Author: Simon Tatham <anakin at pobox.com>
Date: Fri May 25 14:03:13 2018 +0100
Fix a bad free on portfwd name resolution failure.
If name resolution fails, pfd_connect tries to sfree(dummy_realhost)
when it's completely uninitialised - the failed resolution didn't
write to it, and we also didn't precautionarily initialise it to NULL
first. Now we do the latter.
portfwd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 2259f3d335ca40c4a9550057ea91fafc67bdbc07
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=2259f3d335ca40c4a9550057ea91fafc67bdbc07;hp=23f3b651818932d5e7fd5d87a3b366b75cf845c2
Author: Simon Tatham <anakin at pobox.com>
Date: Fri May 25 14:06:51 2018 +0100
Fix null deref on writing OpenSSH pubkey with no comment.
If we're called on to generate the one-line OpenSSH public key format
for a key that we don't have a comment field for, we were mistakenly
testing this by checking if '*comment' rather than 'comment' was zero,
i.e. if comment was NULL we'd dereference it by mistake.
sshpubk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 58379aa5ab04d2fe07e64ef5bbc2c894aa005a22
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=58379aa5ab04d2fe07e64ef5bbc2c894aa005a22;hp=2259f3d335ca40c4a9550057ea91fafc67bdbc07
Author: Simon Tatham <anakin at pobox.com>
Date: Fri May 25 14:12:30 2018 +0100
Fix order of primes when Pageant adds an SSH-1 key.
In the SSH1_AGENTC_ADD_RSA_IDENTITY message, the multiplicative
inverse integer is the inverse of the first prime mod the second one.
In our notation, that means we should send iqmp, then q, then p, which
is also how the Pageant server side expects to receive them.
Unfortunately, we were sending iqmp, p, q instead, which I think must
be a confusion resulting from the SSH 1.5 document naming the primes
the other way round (and talking about the auxiliary value 'inverse of
p mod q').
pageant.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 12b38ad9e171a17c583488156f0c91255546afca
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=12b38ad9e171a17c583488156f0c91255546afca;hp=58379aa5ab04d2fe07e64ef5bbc2c894aa005a22
Author: Simon Tatham <anakin at pobox.com>
Date: Thu May 24 08:59:01 2018 +0100
New header file 'defs.h'.
This centralises a few things that multiple header files were
previously defining, and were protecting against each other's
redefinition with ifdefs - small things like structs and typedefs. Now
all those things are in a defs.h which is by definition safe to
include _first_ (out of all the codebase-local headers) and only need
to be defined once.
defs.h | 37 +++++++++++++++++++++++++++++++++++++
misc.h | 10 ++--------
network.h | 11 +----------
putty.h | 10 +---------
ssh.h | 5 -----
unix/unix.h | 3 ---
windows/winstuff.h | 14 ++------------
7 files changed, 43 insertions(+), 47 deletions(-)
commit bff128fea9864b3ef1435b04d45efbf774e72c09
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=bff128fea9864b3ef1435b04d45efbf774e72c09;hp=12b38ad9e171a17c583488156f0c91255546afca
Author: Simon Tatham <anakin at pobox.com>
Date: Thu May 24 14:55:10 2018 +0100
Make strbuf a less opaque type.
Now, instead of being a black box that you shovel strings into and
eventually extract a final answer, it exposes enough structure fields
to the world that you can append things to it _and_ look inside its
current contents. For convenience, it exports its internal pointer as
both a char * and an unsigned char *.
defs.h | 6 ++++++
misc.c | 64 +++++++++++++++++++++++++++++++++++++++++++---------------------
misc.h | 7 ++++++-
3 files changed, 55 insertions(+), 22 deletions(-)
commit 0e3082ee89d1b3c983bd3428b3d757dd7ea1d719
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=0e3082ee89d1b3c983bd3428b3d757dd7ea1d719;hp=bff128fea9864b3ef1435b04d45efbf774e72c09
Author: Simon Tatham <anakin at pobox.com>
Date: Thu May 24 09:17:13 2018 +0100
New centralised binary-data marshalling system.
I've finally got tired of all the code throughout PuTTY that repeats
the same logic about how to format the SSH binary primitives like
uint32, string, mpint. We've got reasonably organised code in ssh.c
that appends things like that to 'struct Packet'; something similar in
sftp.c which repeats a lot of the work; utility functions in various
places to format an mpint to feed to one or another hash function; and
no end of totally ad-hoc stuff in functions like public key blob
formatters which actually have to _count up_ the size of data
painstakingly, then malloc exactly that much and mess about with
PUT_32BIT.
It's time to bring all of that into one place, and stop repeating
myself in error-prone ways everywhere. The new marshal.h defines a
system in which I centralise all the actual marshalling functions, and
then layer a touch of C macro trickery on top to allow me to (look as
if I) pass a wide range of different types to those functions, as long
as the target type has been set up in the right way to have a write()
function.
This commit adds the new header and source file, and sets up some
general centralised types (strbuf and the various hash-function
contexts like SHA_State), but doesn't use the new calls for anything
yet.
(I've also renamed some internal functions in import.c which were
using the same names that I've just defined macros over. That won't
last long - those functions are going to go away soon, so the changed
names are strictly temporary.)
Recipe | 23 ++++++-----
defs.h | 2 +
import.c | 44 ++++++++++----------
int64.h | 4 ++
marshal.c | 79 +++++++++++++++++++++++++++++++++++
marshal.h | 138 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
misc.c | 8 ++++
misc.h | 2 +
ssh.h | 7 ++++
sshbn.c | 22 ++++++++++
sshmd5.c | 11 +++++
sshsh256.c | 12 ++++++
sshsh512.c | 10 +++++
sshsha.c | 12 ++++++
14 files changed, 341 insertions(+), 33 deletions(-)
commit f1b1b1d260d4762610fe550222f18ae2d9e17b23
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=f1b1b1d260d4762610fe550222f18ae2d9e17b23;hp=0e3082ee89d1b3c983bd3428b3d757dd7ea1d719
Author: Simon Tatham <anakin at pobox.com>
Date: Thu May 24 09:42:02 2018 +0100
Simplify hashing operations in sshrsa.c and sshdss.c.
We can now simply call the centralised functions to put uint32s and
mpints into hash states, so there's no need to have duplicate local
copies doing the same things less type-generically.
sshdss.c | 36 ++++--------------------------------
sshrsa.c | 22 +++-------------------
2 files changed, 7 insertions(+), 51 deletions(-)
commit 4988fd410cf62aa1e7d8c8f34013bcd690b86a7b
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=4988fd410cf62aa1e7d8c8f34013bcd690b86a7b;hp=f1b1b1d260d4762610fe550222f18ae2d9e17b23
Author: Simon Tatham <anakin at pobox.com>
Date: Thu May 24 10:03:36 2018 +0100
Replace all uses of SHA*_Bytes / MD5Update.
In fact, those functions don't even exist any more. The only way to
get data into a primitive hash state is via the new put_* system. Of
course, that means put_data() is a viable replacement for every
previous call to one of the per-hash update functions - but just
mechanically doing that would have missed the opportunity to simplify
a lot of the call sites.
import.c | 32 ++++++++++++-------------
pageant.c | 2 +-
ssh.c | 10 ++++----
ssh.h | 6 -----
sshbcrypt.c | 9 +++-----
sshdss.c | 8 +++----
sshecc.c | 68 ++++++++++++++++++++++--------------------------------
sshmd5.c | 29 +++++++++++------------
sshpubk.c | 28 +++++++++++-----------
sshrsa.c | 18 ++++-----------
sshsh256.c | 39 +++++++++++++------------------
sshsh512.c | 35 ++++++++++++----------------
sshsha.c | 41 ++++++++++++--------------------
unix/uxshare.c | 11 ++-------
windows/winshare.c | 5 +---
15 files changed, 138 insertions(+), 203 deletions(-)
commit 98dce3b2911f96a2630163051982ee3a9c09c1f1
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=98dce3b2911f96a2630163051982ee3a9c09c1f1;hp=4988fd410cf62aa1e7d8c8f34013bcd690b86a7b
Author: Simon Tatham <anakin at pobox.com>
Date: Thu May 24 10:15:36 2018 +0100
Remove the ssh_pkt_add* functions.
All previous uses of them are replaced by the new put_* family.
This is a fairly mechanical transformation, which doesn't take full
advantage of the new ways things can be done more usefully. I'll come
back and clean parts of it up in separate patches later; muddling that
together with this main search-and-replace part would make (even more
of) a giant unreadable monolith.
ssh.c | 567 +++++++++++++++++++++++++++---------------------------------------
1 file changed, 230 insertions(+), 337 deletions(-)
commit 472fddf011a0d420288b84e46649a52f27b5c0bd
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=472fddf011a0d420288b84e46649a52f27b5c0bd;hp=98dce3b2911f96a2630163051982ee3a9c09c1f1
Author: Simon Tatham <anakin at pobox.com>
Date: Thu May 24 10:39:07 2018 +0100
Clean up the parse_ssh_ttymodes system.
There's no reason to pass a 'void *' through and then cast it back to
a packet. All those functions are really doing is serialising a pile
of output on to an arbitrary receiver, so it's nicer to use the new
abstract BinarySink type, and then the do_mode function doesn't have
to cast it at all.
This also removes one lingering ugliness from the previous commit, in
the form of the variable 'stringstart' I introduced in ssh2_setup_pty
to work around the removal of the addstring_start system. Now that's
done the sensible way, by constructing the subsidiary terminal-modes
string in a strbuf (taking advantage of the new type-genericity
meaning I can pass that to the underlying functions just as easily as
a struct Packet), and then putting that into the final packet
afterwards.
ssh.c | 56 ++++++++++++++++++++++++--------------------------------
1 file changed, 24 insertions(+), 32 deletions(-)
commit 81a04c4fe650dabcb277986c8d98e363e60fc781
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=81a04c4fe650dabcb277986c8d98e363e60fc781;hp=472fddf011a0d420288b84e46649a52f27b5c0bd
Author: Simon Tatham <anakin at pobox.com>
Date: Thu May 24 10:42:40 2018 +0100
Remove the sftp_pkt_add* functions.
Another set of duplicated marshalling bites the dust, replaced with
the same generic functions I'm using everywhere else.
sftp.c | 188 +++++++++++++++++++++++++----------------------------------------
1 file changed, 72 insertions(+), 116 deletions(-)
commit a990738aca6eafb5b3daba3658872950ab81ddbe
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=a990738aca6eafb5b3daba3658872950ab81ddbe;hp=81a04c4fe650dabcb277986c8d98e363e60fc781
Author: Simon Tatham <anakin at pobox.com>
Date: Thu May 24 10:48:20 2018 +0100
Use the BinarySink system for conf serialisation.
Now instead of iterating through conf twice in separate functions,
once to count up the size of the serialised data and once to write it
out, I just go through once and dump it all in a strbuf.
(Of course, I could still do a two-pass count-then-allocate approach
easily enough in this system; nothing would stop me writing a
BinarySink implementation that didn't actually store any data and just
counted its size, and then I could choose at each call site whether I
preferred to do it that way.)
Recipe | 17 +++++++++------
conf.c | 65 ++++++++-----------------------------------------------
putty.h | 8 +++----
unix/gtkmain.c | 32 ++++++++++-----------------
unix/uxmisc.c | 16 ++++----------
windows/window.c | 9 ++++++--
windows/winmisc.c | 24 ++++++--------------
7 files changed, 53 insertions(+), 118 deletions(-)
commit 67de463cca48b8600531d80d9a0a3b6964188312
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=67de463cca48b8600531d80d9a0a3b6964188312;hp=a990738aca6eafb5b3daba3658872950ab81ddbe
Author: Simon Tatham <anakin at pobox.com>
Date: Thu May 24 10:59:39 2018 +0100
Change ssh.h crypto APIs to output to BinarySink.
This affects all the functions that generate public and private key
and signature blobs of all kinds, plus ssh_ecdhkex_getpublic. Instead
of returning a bare block of memory and taking an extra 'int *length'
parameter, all these functions now write to a BinarySink, and it's the
caller's job to have prepared an appropriate one where they want the
output to go (usually a strbuf).
The main value of this change is that those blob-generation functions
were chock full of ad-hoc length-counting and data marshalling. You
have only to look at rsa2_{public,private}_blob, for example, to see
the kind of thing I was keen to get rid of!
cmdgen.c | 46 ++++----
import.c | 144 ++++++++++++-------------
pageant.c | 316 ++++++++++++++++++++----------------------------------
pageant.h | 3 +-
ssh.c | 156 ++++++++++++---------------
ssh.h | 23 ++--
sshdss.c | 130 +++++-----------------
sshecc.c | 294 ++++++++++++++------------------------------------
sshpubk.c | 204 ++++++++++++++++-------------------
sshrsa.c | 147 ++++++-------------------
unix/uxpgnt.c | 25 +++--
windows/winpgen.c | 10 +-
12 files changed, 542 insertions(+), 956 deletions(-)
commit e27ddf6d282ad47a6a84b8c1adf0edd1edffaae7
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=e27ddf6d282ad47a6a84b8c1adf0edd1edffaae7;hp=67de463cca48b8600531d80d9a0a3b6964188312
Author: Simon Tatham <anakin at pobox.com>
Date: Thu May 24 13:05:48 2018 +0100
Make ssh_hash and ssh_mac expose a BinarySink.
Just as I did a few commits ago with the low-level SHA_Bytes type
functions, the ssh_hash and ssh_mac abstract types now no longer have
a direct foo->bytes() update method at all. Instead, each one has a
foo->sink() function that returns a BinarySink with the same lifetime
as the hash context, and then the caller can feed data into that in
the usual way.
This lets me get rid of a couple more duplicate marshalling routines
in ssh.c: hash_string(), hash_uint32(), hash_mpint().
ssh.c | 121 +++++++++++++++++++++++--------------------------------------
ssh.h | 4 +-
sshccp.c | 32 +++++++++-------
sshecc.c | 4 +-
sshmd5.c | 11 +++---
sshrsa.c | 9 +++--
sshsh256.c | 21 +++++------
sshsh512.c | 9 ++---
sshsha.c | 27 ++++++--------
9 files changed, 105 insertions(+), 133 deletions(-)
commit 8ce0a67028ebfa2c0114b9c1543043f613e222d2
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=8ce0a67028ebfa2c0114b9c1543043f613e222d2;hp=e27ddf6d282ad47a6a84b8c1adf0edd1edffaae7
Author: Simon Tatham <anakin at pobox.com>
Date: Thu May 24 13:11:56 2018 +0100
Use BinarySink to tidy up key export code.
The output routines in import.c and sshpubk.c were further horrifying
hotbeds of manual length-counting. Reworked it all so that it builds
up key file components in strbufs, and uses the now boringly standard
put_* functions to write into those strbufs.
This removes the write_* functions in import.c, which I had to hastily
rename a few commits ago when I introduced the new marshalling system
in the first place.
However, I wasn't quite able to get rid of _all_ of import.c's local
formatting functions; there are a couple still there (but now with new
BinarySink-style API) which output multiprecision integers in a couple
of different formats starting from an existing big-endian binary
representation, as opposed to starting from an internal Bignum.
Recipe | 2 +-
import.c | 638 +++++++++++++++++++++++---------------------------------------
sshpubk.c | 163 ++++++----------
3 files changed, 290 insertions(+), 513 deletions(-)
commit 0c44fa85df39b6a0a1cfd3e62feab162e03de9ac
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=0c44fa85df39b6a0a1cfd3e62feab162e03de9ac;hp=8ce0a67028ebfa2c0114b9c1543043f613e222d2
Author: Simon Tatham <anakin at pobox.com>
Date: Thu May 24 13:18:13 2018 +0100
Build outgoing SSH agent requests in a strbuf.
This simplifies the client code both in ssh.c and in the client side
of Pageant.
I've cheated a tiny bit by preparing agent requests in a strbuf that
has space reserved at the front for the packet frame, which makes life
easier for the code that sends them off.
aqsync.c | 4 +-
misc.c | 13 +++++
misc.h | 4 ++
pageant.c | 167 ++++++++++++++++++++---------------------------------
putty.h | 4 +-
ssh.c | 138 ++++++++++++++++++++-----------------------
unix/uxagentc.c | 9 ++-
windows/winpgntc.c | 8 ++-
8 files changed, 159 insertions(+), 188 deletions(-)
commit b6cbad89fc56c1f98ef154568a7533f474243f8c
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=b6cbad89fc56c1f98ef154568a7533f474243f8c;hp=0c44fa85df39b6a0a1cfd3e62feab162e03de9ac
Author: Simon Tatham <anakin at pobox.com>
Date: Thu May 24 13:23:17 2018 +0100
Build SSH agent reply messages in a BinarySink.
This gets rid of yet another huge pile of beating around the bush with
length-counting. Also, this time, the BinarySink in question is a
little more interesting than just being a strbuf every time: on
Windows, where the shared-memory Pageant IPC system imposes a hard
limit on the size of message we can return, I've written a custom
BinarySink implementation that collects up to that much data and then
gives up and sets an overflow flag rather than continue to allocate
memory.
So the main Pageant code no longer has to worry about checking
AGENT_MAX_MSGLEN all the time - and better still, the Unix version of
Pageant is no longer _limited_ by AGENT_MAX_MSGLEN in its outgoing
messages, i.e. it could store a really extra large number of keys if
it needed to. That limitation is now a local feature of Windows
Pageant rather than intrinsic to the whole code base.
(AGENT_MAX_MSGLEN is still used to check incoming agent messages for
sanity, however. Mostly that's because I feel I ought to check them
against _some_ limit, and this one seems sensible enough. Incoming
agent messages are more bounded anyway - they generally don't hold
more than _one_ private key.)
pageant.c | 409 +++++++++++++++++++++++++-----------------------------
pageant.h | 15 +-
windows/winpgnt.c | 47 +++++--
3 files changed, 234 insertions(+), 237 deletions(-)
commit 855a6eaaddc617badd87544f188b6541bc0f80e3
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=855a6eaaddc617badd87544f188b6541bc0f80e3;hp=b6cbad89fc56c1f98ef154568a7533f474243f8c
Author: Simon Tatham <anakin at pobox.com>
Date: Thu May 24 13:27:34 2018 +0100
Use strbuf to tidy up sshshare.c.
Another big pile of packet-construction now looks simpler and nicer,
although - as with the agent messages - I've done that tiny cheat of
filling in the length field at the start of the packet frame at the
very end of processing.
sshshare.c | 274 +++++++++++++++++++++++++++++--------------------------------
1 file changed, 129 insertions(+), 145 deletions(-)
commit 8c7eddc9a122987d8045ae0412954edd59f14ebf
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=8c7eddc9a122987d8045ae0412954edd59f14ebf;hp=855a6eaaddc617badd87544f188b6541bc0f80e3
Author: Simon Tatham <anakin at pobox.com>
Date: Thu May 24 13:30:16 2018 +0100
Use strbufs to tidy up SOCKS proxy protocol code.
cproxy.c | 6 +-
nocproxy.c | 2 +-
proxy.c | 187 +++++++++++++++++++++++++++++++------------------------------
proxy.h | 2 +-
4 files changed, 99 insertions(+), 98 deletions(-)
More information about the tartarus-commits
mailing list