simon-git: putty (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Sat May 26 09:29:10 BST 2018


TL;DR:
  2bfbf15 Remove a redundant failure check after an snew.
  43ec339 Remove vestiges of attempt at MS Crypto API support.
  c9bad33 Centralise TRUE and FALSE definitions into defs.h.
  2fc2957 Add a missing const.
  7babe66 Make lots of generic data parameters into 'void *'.

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-26 09:29:10

commit 2bfbf15c6582ce1961dac9f637f9d467f0e533e4
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=2bfbf15c6582ce1961dac9f637f9d467f0e533e4;hp=b95a6dece62564041e580cd744cdf7c5aed5694c
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat May 26 06:10:06 2018 +0100

    Remove a redundant failure check after an snew.
    
    I spotted this at some point during this week's BinarySink
    refactoring, but only just remembered to come back and fix it. snew
    aborts the whole program rather than return NULL, so there's no need
    to check its return value against NULL.

 import.c | 4 ----
 1 file changed, 4 deletions(-)

commit 43ec3397b6d7aa2b1dc005ac01619b807e70fe51
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=43ec3397b6d7aa2b1dc005ac01619b807e70fe51;hp=2bfbf15c6582ce1961dac9f637f9d467f0e533e4
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat May 26 07:06:33 2018 +0100

    Remove vestiges of attempt at MS Crypto API support.
    
    There was a time, back when the USA was more vigorously against
    cryptography, when we toyed with the idea of having a version of PuTTY
    that outsourced its cryptographic primitives to the Microsoft optional
    encryption API, which would effectively create a tool that acted like
    PuTTY proper on a system with that API installed, but automatically
    degraded to being PuTTYtel on a system without, and meanwhile (so went
    the theory) it could be moved freely across national borders with
    crypto restrictions, because it didn't _contain_ any of the actual
    crypto.
    
    I don't recall that we ever got it working at all. And certainly the
    vestiges of it here and there in the current code are completely
    unworkable - they refer to an 'mscrypto.c' that doesn't even exist,
    and the ifdefs in the definitions of structures like RSAKey and
    MD5Context are not matched by any corresponding ifdefs in the code. So
    I ought to have got round to removing it long ago, in order to avoid
    misleading anyone.

 putty.h           |  8 --------
 ssh.c             | 29 ++++++++++-------------------
 ssh.h             | 17 -----------------
 windows/wincons.c |  3 ---
 windows/window.c  |  3 ---
 5 files changed, 10 insertions(+), 50 deletions(-)

commit c9bad331e63f96dd4f17276c069a38ff10765ed7
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=c9bad331e63f96dd4f17276c069a38ff10765ed7;hp=43ec3397b6d7aa2b1dc005ac01619b807e70fe51
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat May 26 07:19:18 2018 +0100

    Centralise TRUE and FALSE definitions into defs.h.
    
    This removes a lot of pointless duplications of those constants.
    
    Of course, _ideally_, I should upgrade to C99 bool throughout the code
    base, replacing TRUE and FALSE with true and false and tagging
    variables explicitly as bool when that's what they semantically are.
    But that's a much bigger piece of work, and shouldn't block this
    trivial cleanup!

 defs.h       |  7 +++++++
 misc.h       |  7 -------
 portfwd.c    |  7 -------
 raw.c        |  7 -------
 rlogin.c     |  7 -------
 ssh.c        |  7 -------
 sshzlib.c    | 14 +++++++++-----
 telnet.c     |  7 -------
 unix/uxpty.c |  7 -------
 9 files changed, 16 insertions(+), 54 deletions(-)

commit 2fc29577dfb9c10c6349dca692d0f1026d4c5779
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=2fc29577dfb9c10c6349dca692d0f1026d4c5779;hp=c9bad331e63f96dd4f17276c069a38ff10765ed7
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat May 26 08:00:20 2018 +0100

    Add a missing const.
    
    Similarly to commit 1c4f12252, this was one of those errors that C
    can't catch because of the const-removing prototype of memchr. But
    when you memchr() a const string, the value you get back is
    _semantically_ a pointer to const, and should be assigned into a
    variable of that type.

 be_misc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

commit 7babe66a839fecfe5d8b3db901b06d2fb7672cfc
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=7babe66a839fecfe5d8b3db901b06d2fb7672cfc;hp=2fc29577dfb9c10c6349dca692d0f1026d4c5779
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat May 26 08:31:34 2018 +0100

    Make lots of generic data parameters into 'void *'.
    
    This is a cleanup I started to notice a need for during the BinarySink
    work. It removes a lot of faffing about casting things to char * or
    unsigned char * so that some API will accept them, even though lots of
    such APIs really take a plain 'block of raw binary data' argument and
    don't care what C thinks the signedness of that data might be - they
    may well reinterpret it back and forth internally.
    
    So I've tried to arrange for all the function call APIs that ought to
    have a void * (or const void *) to have one, and those that need to do
    pointer arithmetic on the parameter internally can cast it back at the
    top of the function. That saves endless ad-hoc casts at the call
    sites.

 contrib/cygtermd/telnet.c |  6 ++--
 cproxy.c                  |  2 +-
 fuzzterm.c                |  4 +--
 import.c                  | 10 +++---
 ldisc.c                   |  7 +++--
 network.h                 |  4 +--
 pageant.c                 |  2 +-
 portfwd.c                 |  8 ++---
 proxy.c                   |  4 +--
 pscp.c                    | 24 +++++++--------
 psftp.c                   |  4 +--
 putty.h                   | 10 +++---
 raw.c                     |  2 +-
 rlogin.c                  |  2 +-
 sftp.c                    |  2 +-
 sftp.h                    |  2 +-
 ssh.c                     | 15 ++++-----
 ssh.h                     | 78 ++++++++++++++++++++++-------------------------
 sshaes.c                  | 43 ++++++++++++++------------
 ssharcf.c                 |  9 +++---
 sshblowf.c                | 40 ++++++++++++------------
 sshblowf.h                |  7 ++---
 sshbn.c                   |  6 ++--
 sshccp.c                  | 15 ++++-----
 sshdes.c                  | 66 +++++++++++++++++++++++----------------
 sshdss.c                  | 22 +++++++------
 sshecc.c                  | 29 ++++++++++--------
 sshrsa.c                  | 22 +++++++------
 telnet.c                  | 46 ++++++++++++++--------------
 terminal.c                |  5 +--
 unix/gtkwin.c             |  4 +--
 unix/uxnet.c              |  8 ++---
 unix/uxpgnt.c             |  5 +--
 unix/uxplink.c            |  4 +--
 unix/uxproxy.c            |  4 +--
 windows/window.c          |  6 ++--
 windows/winhsock.c        |  4 +--
 windows/winnet.c          |  8 ++---
 windows/winplink.c        |  4 +--
 x11fwd.c                  |  5 ++-
 40 files changed, 284 insertions(+), 264 deletions(-)



More information about the tartarus-commits mailing list