simon-git: putty (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Sun Jun 3 17:16:23 BST 2018


TL;DR:
  06a14fe Reorganise ssh_keyalg and use it as a vtable.
  025599e Unix PuTTYgen: switch to /dev/urandom by default.
  6142013 Windows PuTTYgen: switch to CryptGenRandom.
  f1fae1b Fix a Windows warning on a strange cast.
  869a0f5 Fix Windows warning about GetVersionEx deprecation.
  4058002 Fix assertion failure on ssh.com export of ECDSA.
  0603256 Unix Pageant: add alias '-L' for '--private-openssh'.

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-06-03 17:16:23

commit 06a14fe8b8b96bb1c64ffa578a4598b0eb388e63
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=06a14fe8b8b96bb1c64ffa578a4598b0eb388e63;hp=15bacbf630ca1b7ffc20170d776cfbae68d8eea0
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Jun 3 12:58:05 2018 +0100

    Reorganise ssh_keyalg and use it as a vtable.
    
    After Pavel Kryukov pointed out that I have to put _something_ in the
    'ssh_key' structure, I thought of an actually useful thing to put
    there: why not make it store a pointer to the ssh_keyalg structure?
    Then ssh_key becomes a classoid - or perhaps 'traitoid' is a closer
    analogy - in the same style as Socket and Plug. And just like Socket
    and Plug, I've also arranged a system of wrapper macros that avoid the
    need to mention the 'object' whose method you're invoking twice at
    each call site.
    
    The new vtable pointer directly replaces an existing field of struct
    ec_key (which was usable by several different ssh_keyalgs, so it
    already had to store a pointer to the currently active one), and also
    replaces the 'alg' field of the ssh2_userkey structure that wraps up a
    cryptographic key with its comment field.
    
    I've also taken the opportunity to clean things up a bit in general:
    most of the methods now have new and clearer names (e.g. you'd never
    know that 'newkey' made a public-only key while 'createkey' made a
    public+private key pair unless you went and looked it up, but now
    they're called 'new_pub' and 'new_priv' you might be in with a
    chance), and I've completely removed the openssh_private_npieces field
    after realising that it was duplicating information that is actually
    _more_ conveniently obtained by calling the new_priv_openssh method
    (formerly openssh_createkey) and throwing away the result.

 cmdgen.c          |  28 +++++-------
 import.c          | 131 ++++++++++++++++++++++++------------------------------
 pageant.c         |  44 +++++++++---------
 ssh.c             | 129 +++++++++++++++++++++++++----------------------------
 ssh.h             |  67 ++++++++++++++++------------
 sshdss.c          |  38 +++++++++-------
 sshdssg.c         |   2 +
 sshecc.c          | 119 ++++++++++++++++++++++++++-----------------------
 sshecdsag.c       |   4 +-
 sshpubk.c         |  29 ++++++------
 sshrsa.c          |  40 +++++++++--------
 sshrsag.c         |   2 +
 windows/winpgen.c |  20 ++++-----
 windows/winpgnt.c |   7 +--
 14 files changed, 327 insertions(+), 333 deletions(-)

commit 025599ec999dd8454f2a8fdd11c08329ac608571
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=025599ec999dd8454f2a8fdd11c08329ac608571;hp=06a14fe8b8b96bb1c64ffa578a4598b0eb388e63
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Jun 3 14:30:28 2018 +0100

    Unix PuTTYgen: switch to /dev/urandom by default.
    
    The general wisdom these days - in particular as given by the Linux
    urandom(4) man page - seems to be that there's no need to use the
    blocking /dev/random any more unless you're running at very early boot
    time when the system random pool is at serious risk of not having any
    entropy in it at all.
    
    In case of non-Linux systems that don't think /dev/urandom is a
    standard name, I fall back to /dev/random if /dev/urandom can't be
    found.

 unix/uxgen.c | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

commit 6142013abc701f235772e3caf94246420b1ac9d4
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=6142013abc701f235772e3caf94246420b1ac9d4;hp=025599ec999dd8454f2a8fdd11c08329ac608571
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Jun 3 14:41:31 2018 +0100

    Windows PuTTYgen: switch to CryptGenRandom.
    
    We now only use the mouse-movement based entropy collection system if
    the system CPRNG fails to provide us with as much entropy as we want.

 windows/winnoise.c |  44 +++++++++-------
 windows/winpgen.c  | 145 ++++++++++++++++++++++++++++++++---------------------
 windows/winstuff.h |   5 ++
 3 files changed, 120 insertions(+), 74 deletions(-)

commit f1fae1bfaa6c409f0a37dcaada73ebe2fb8f1b35
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=f1fae1bfaa6c409f0a37dcaada73ebe2fb8f1b35;hp=6142013abc701f235772e3caf94246420b1ac9d4
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Jun 3 14:53:29 2018 +0100

    Fix a Windows warning on a strange cast.
    
    The specific thing that's strange about it is that it's _not_ an error
    even though the compiler is quite justified in being suspicious about
    it! The MS APIs define two different structures to have identical
    formats.

 windows/wingss.c | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

commit 869a0f5f710129f775d8d9384ce46e6115e1cfeb
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=869a0f5f710129f775d8d9384ce46e6115e1cfeb;hp=f1fae1bfaa6c409f0a37dcaada73ebe2fb8f1b35
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Jun 3 15:05:44 2018 +0100

    Fix Windows warning about GetVersionEx deprecation.
    
    Rather than squelching the warning, I'm actually paying attention to
    the deprecation, in that I'm allowing for the possibility that the
    function might stop existing or stop returning success.

 windows/window.c   | 29 +++++++++++------------------
 windows/winjump.c  |  6 ++----
 windows/winmisc.c  | 37 ++++++++++++++++++++++++++++++++++---
 windows/winpgnt.c  | 10 ++--------
 windows/winprint.c |  2 +-
 windows/winstuff.h |  4 ++--
 6 files changed, 52 insertions(+), 36 deletions(-)

commit 405800290dd0bcfe0e509b7a46763e42be5f3e35
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=405800290dd0bcfe0e509b7a46763e42be5f3e35;hp=869a0f5f710129f775d8d9384ce46e6115e1cfeb
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Jun 3 15:38:06 2018 +0100

    Fix assertion failure on ssh.com export of ECDSA.
    
    It's a key type that format doesn't know how to handle, but that's no
    excuse to fail an assertion - we have a perfectly good failure code we
    can return from the export function, so we should use it.

 import.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

commit 0603256964a9f3c7e918affd0f904f6a3a234e1f
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=0603256964a9f3c7e918affd0f904f6a3a234e1f;hp=405800290dd0bcfe0e509b7a46763e42be5f3e35
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Jun 3 15:38:57 2018 +0100

    Unix Pageant: add alias '-L' for '--private-openssh'.
    
    Matches the -L option in Unix PuTTYgen, and is much easier to type.

 unix/uxpgnt.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)



More information about the tartarus-commits mailing list