simon-git: putty (main): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Thu Apr 22 18:43:06 BST 2021


TL;DR:
  b1d2f968 sesschan.c: use dupprintf in place of snprintf.
  66e62915 Move a few stray header files into the crypto subdir.
  83fa4349 Move the SSH implementation into its own subdirectory.
  8f0f5b69 Move key-generation code into its own subdir.
  419e5e22 Move other backends into a subdirectory.
  1c039d0a Spelling: standardise on "DSA", not "DSS".

Repository:     https://git.tartarus.org/simon/putty.git
On the web:     https://git.tartarus.org/?p=simon/putty.git
Branch updated: main
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2021-04-22 18:43:06

commit b1d2f96823e92128a70f425a467b0b4d2655caa7
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=b1d2f96823e92128a70f425a467b0b4d2655caa7;hp=970f374ea689c33321760ba62cfcad401d32521d
Author: Simon Tatham <anakin at pobox.com>
Date:   Thu Apr 22 17:43:38 2021 +0100

    sesschan.c: use dupprintf in place of snprintf.
    
    I hadn't actually realised until now that the SSH server code is now
    being compiled on Windows! It happened because I've been using static
    libraries internally to the build organisation: of course, CMake has
    no way of knowing that those libraries are only needed _within_ the
    build, and for all it knows they might be end products shipped to
    users to link their own applications with. So all the objects in the
    'sshserver' library will now be compiled, even on Windows, where no
    applications actually link with it.
    
    And in that context, the use of snprintf caused a compiler warning
    from the w32old build, because there, snprintf doesn't exist in the
    older version of the C library.
    
    Of course, it's currently benign, because no application in the w32old
    build (or any other Windows build) is actually linking again the
    sshserver library. But I don't want to rule it out in future, or at
    least not for a trivial reason like this. So I've fixed the warning in
    the simplest way, by switching to our own dupprintf, which is
    available everywhere.

 sesschan.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

commit 66e62915d2565013458b83218e489a1f2aa6ab82
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=66e62915d2565013458b83218e489a1f2aa6ab82;hp=b1d2f96823e92128a70f425a467b0b4d2655caa7
Author: Simon Tatham <anakin at pobox.com>
Date:   Thu Apr 22 17:57:56 2021 +0100

    Move a few stray header files into the crypto subdir.
    
    sshblowf.h (as was) is 100% internal to that directory. And mpint_i.h
    and ecc.h are specialist enough that it's reasonable to ask clients
    outside the crypto directory to include them with a subdirectory path,
    to hint that it's an unusual thing to be doing.

 crypto/bcrypt.c                 | 2 +-
 crypto/blowfish.c               | 2 +-
 sshblowf.h => crypto/blowfish.h | 0
 ecc.h => crypto/ecc.h           | 0
 mpint_i.h => crypto/mpint_i.h   | 0
 mpunsafe.c                      | 2 +-
 testcrypt.c                     | 2 +-
 testsc.c                        | 2 +-
 8 files changed, 5 insertions(+), 5 deletions(-)

commit 83fa43497fb6885152ed303b77a904ae5ca9c43e
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=83fa43497fb6885152ed303b77a904ae5ca9c43e;hp=66e62915d2565013458b83218e489a1f2aa6ab82
Author: Simon Tatham <anakin at pobox.com>
Date:   Thu Apr 22 17:58:40 2021 +0100

    Move the SSH implementation into its own subdirectory.
    
    This clears up another large pile of clutter at the top level, and in
    the process, allows me to rename source files to things that don't all
    have that annoying 'ssh' prefix at the top.

 CMakeLists.txt                                     | 32 ++------------
 crypto/diffie-hellman.c                            |  2 +-
 mpunsafe.c                                         |  2 +-
 pscp.c                                             |  2 +-
 psftp.c                                            |  2 +-
 psftpcommon.c                                      |  2 +-
 psocks.c                                           |  2 +-
 putty.h                                            |  8 ++--
 settings.c                                         |  4 +-
 ssh.h                                              |  2 +-
 ssh/CMakeLists.txt                                 | 51 ++++++++++++++++++++++
 agentf.c => ssh/agentf.c                           |  2 +-
 ssh2bpp-bare.c => ssh/bpp-bare.c                   |  6 +--
 sshbpp.h => ssh/bpp.h                              |  0
 ssh1bpp.c => ssh/bpp1.c                            |  2 +-
 ssh2bpp.c => ssh/bpp2.c                            |  4 +-
 ssh1censor.c => ssh/censor1.c                      |  0
 ssh2censor.c => ssh/censor2.c                      |  0
 sshchan.h => ssh/channel.h                         |  0
 sshcommon.c => ssh/common.c                        |  8 ++--
 .../connection1-client.c                           |  8 ++--
 .../connection1-server.c                           | 10 ++---
 ssh1connection.c => ssh/connection1.c              |  8 ++--
 ssh1connection.h => ssh/connection1.h              |  0
 .../connection2-client.c                           |  8 ++--
 .../connection2-server.c                           | 10 ++---
 ssh2connection.c => ssh/connection2.c              | 10 ++---
 ssh2connection.h => ssh/connection2.h              |  0
 sshcrcda.c => ssh/crc-attack-detector.c            |  0
 sshgss.h => ssh/gss.h                              |  2 +-
 sshgssc.c => ssh/gssc.c                            |  2 +-
 sshgssc.h => ssh/gssc.h                            |  2 +-
 ssh2kex-client.c => ssh/kex2-client.c              |  6 +--
 ssh2kex-server.c => ssh/kex2-server.c              |  8 ++--
 ssh1login-server.c => ssh/login1-server.c          |  6 +--
 ssh1login.c => ssh/login1.c                        |  4 +-
 mainchan.c => ssh/mainchan.c                       | 12 ++---
 sshnogss.c => ssh/nogss.c                          |  0
 noshare.c => ssh/nosharing.c                       |  0
 pgssapi.c => ssh/pgssapi.c                         |  0
 pgssapi.h => ssh/pgssapi.h                         |  0
 portfwd.c => ssh/portfwd.c                         |  2 +-
 sshppl.h => ssh/ppl.h                              |  2 +-
 scpserver.c => ssh/scpserver.c                     |  2 +-
 sshserver.c => ssh/server.c                        | 12 ++---
 sshserver.h => ssh/server.h                        |  0
 sesschan.c => ssh/sesschan.c                       |  6 +--
 sftp.c => ssh/sftp.c                               |  0
 sftp.h => ssh/sftp.h                               |  0
 sftpcommon.c => ssh/sftpcommon.c                   |  0
 sftpserver.c => ssh/sftpserver.c                   |  0
 sshshare.c => ssh/sharing.c                        |  0
 sshsignals.h => ssh/signal-list.h                  |  0
 ssh.c => ssh/ssh.c                                 | 10 ++---
 ssh2transhk.c => ssh/transient-hostkey-cache.c     |  0
 ssh2transport.c => ssh/transport2.c                |  8 ++--
 ssh2transport.h => ssh/transport2.h                |  4 +-
 sshttymodes.h => ssh/ttymode-list.h                |  0
 ssh2userauth.c => ssh/userauth2-client.c           |  8 ++--
 ssh2userauth-server.c => ssh/userauth2-server.c    | 10 ++---
 sshverstring.c => ssh/verstring.c                  |  2 +-
 x11fwd.c => ssh/x11fwd.c                           |  2 +-
 sshzlib.c => ssh/zlib.c                            |  0
 testzlib.c                                         |  2 +-
 unix/CMakeLists.txt                                | 10 ++---
 unix/platform.h                                    |  2 +-
 unix/uxgss.c                                       |  6 +--
 unix/uxpsusan.c                                    |  2 +-
 unix/uxpty.c                                       |  8 ++--
 unix/uxserver.c                                    |  2 +-
 unix/uxsftpserver.c                                |  4 +-
 utils/sshutils.c                                   |  2 +-
 windows/CMakeLists.txt                             |  2 +-
 windows/platform.h                                 |  4 +-
 windows/wingss.c                                   |  6 +--
 x11disp.c                                          |  2 +-
 76 files changed, 186 insertions(+), 161 deletions(-)

commit 8f0f5b69c0667900873738ce9bd37dbb1e6c28e8
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=8f0f5b69c0667900873738ce9bd37dbb1e6c28e8;hp=83fa43497fb6885152ed303b77a904ae5ca9c43e
Author: Simon Tatham <anakin at pobox.com>
Date:   Thu Apr 22 17:59:16 2021 +0100

    Move key-generation code into its own subdir.
    
    Including mpunsafe.{h,c}, which should be an extra defence against
    inadvertently using it outside the keygen library.

 CMakeLists.txt                              |  3 +--
 keygen/CMakeLists.txt                       | 10 ++++++++++
 sshdssg.c => keygen/dsa.c                   |  0
 sshecdsag.c => keygen/ecdsa.c               |  0
 millerrabin.c => keygen/millerrabin.c       |  0
 mpunsafe.c => keygen/mpunsafe.c             |  0
 mpunsafe.h => keygen/mpunsafe.h             |  0
 pockle.c => keygen/pockle.c                 |  0
 sshprime.c => keygen/prime.c                |  0
 primecandidate.c => keygen/primecandidate.c |  0
 sshrsag.c => keygen/rsa.c                   |  0
 smallprimes.c => keygen/smallprimes.c       |  0
 12 files changed, 11 insertions(+), 2 deletions(-)

commit 419e5e2230850f1555d44e62417e8f606cb68e6e
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=419e5e2230850f1555d44e62417e8f606cb68e6e;hp=8f0f5b69c0667900873738ce9bd37dbb1e6c28e8
Author: Simon Tatham <anakin at pobox.com>
Date:   Thu Apr 22 18:17:35 2021 +0100

    Move other backends into a subdirectory.
    
    This is the last of the subdirectory creations I had planned. This one
    is almost too footling to bother with (it hardly declutters the top
    level very much).
    
    One useful side effect is that I've included testback.c (containing
    the null and loopback backends) in the otherbackends library, which
    means it will now actually be _compiled_ even when nothing's using it,
    and we'll spot bit-rot promptly when internal APIs change.
    
    (And, to prove the point, I've immediately had to fix some bit-rot.)

 CMakeLists.txt                         |  2 +-
 otherbackends/CMakeLists.txt           |  6 ++++++
 raw.c => otherbackends/raw.c           |  0
 rlogin.c => otherbackends/rlogin.c     |  0
 supdup.c => otherbackends/supdup.c     |  0
 telnet.c => otherbackends/telnet.c     |  0
 testback.c => otherbackends/testback.c | 18 +++++++++---------
 7 files changed, 16 insertions(+), 10 deletions(-)

commit 1c039d0a7b31c181a2d87021a98e85b75e5b1ee8
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=1c039d0a7b31c181a2d87021a98e85b75e5b1ee8;hp=419e5e2230850f1555d44e62417e8f606cb68e6e
Author: Simon Tatham <anakin at pobox.com>
Date:   Thu Apr 22 18:28:35 2021 +0100

    Spelling: standardise on "DSA", not "DSS".
    
    This code base has always been a bit confused about which spelling it
    likes to use to refer to that signature algorithm. The SSH protocol id
    is "ssh-dss". But everyone I know refers to it as the Digital
    Signature _Algorithm_, not the Digital Signature _Standard_.
    
    When I moved everything down into the crypto subdir, I took the
    opportunity to rename sshdss.c to dsa.c. Now I'm doing the rest of the
    job: all internal identifiers and code comments refer to DSA, and the
    spelling "dss" only survives in externally visible identifiers that
    have to remain constant.
    
    (Such identifiers include the SSH protocol id, and also the string id
    used to identify the key type in PuTTY's own host key cache. We can't
    change the latter without causing everyone a backwards-compatibility
    headache, and if we _did_ ever decide to do that, we'd surely want to
    do a much more thorough job of making the cache format more sensible!)

 cmdgen.c          |   6 +-
 crypto/dsa.c      | 256 +++++++++++++++++++++++++++---------------------------
 crypto/ecc-ssh.c  |   2 +-
 import.c          |  12 +--
 keygen/dsa.c      |   6 +-
 ssh.h             |   6 +-
 ssh/transport2.h  |   2 +-
 sshkeygen.h       |   2 +-
 sshpubk.c         |   2 +-
 testcrypt.c       |   8 +-
 windows/winpgen.c |  10 +--
 windows/winpgnt.c |   2 +-
 12 files changed, 157 insertions(+), 157 deletions(-)



More information about the tartarus-commits mailing list