Skip to content
Snippets Groups Projects
  1. Sep 08, 2019
    • Simon Tatham's avatar
      Whitespace rationalisation of entire code base. · 5d718ef6
      Simon Tatham authored
      The number of people has been steadily increasing who read our source
      code with an editor that thinks tab stops are 4 spaces apart, as
      opposed to the traditional tty-derived 8 that the PuTTY code expects.
      
      So I've been wondering for ages about just fixing it, and switching to
      a spaces-only policy throughout the code. And I recently found out
      about 'git blame -w', which should make this change not too disruptive
      for the purposes of source-control archaeology; so perhaps now is the
      time.
      
      While I'm at it, I've also taken the opportunity to remove all the
      trailing spaces from source lines (on the basis that git dislikes
      them, and is the only thing that seems to have a strong opinion one
      way or the other).
          
      Apologies to anyone downstream of this code who has complicated patch
      sets to rebase past this change. I don't intend it to be needed again.
      5d718ef6
  2. Nov 03, 2018
    • Simon Tatham's avatar
      Adopt C99 <stdint.h> integer types. · a647f2ba
      Simon Tatham authored
      The annoying int64.h is completely retired, since C99 guarantees a
      64-bit integer type that you can actually treat like an ordinary
      integer. Also, I've replaced the local typedefs uint32 and word32
      (scattered through different parts of the crypto code) with the
      standard uint32_t.
      a647f2ba
  3. Apr 26, 2018
    • Simon Tatham's avatar
      Support GSS key exchange, for Kerberos 5 only. · d515e4f1
      Simon Tatham authored
      This is a heavily edited (by me) version of a patch originally due to
      Nico Williams and Viktor Dukhovni. Their comments:
      
       * Don't delegate credentials when rekeying unless there's a new TGT
         or the old service ticket is nearly expired.
      
       * Check for the above conditions more frequently (every two minutes
         by default) and rekey when we would delegate credentials.
      
       * Do not rekey with very short service ticket lifetimes; some GSSAPI
         libraries may lose the race to use an almost expired ticket. Adjust
         the timing of rekey checks to try to avoid this possibility.
      
      My further comments:
      
      The most interesting thing about this patch to me is that the use of
      GSS key exchange causes a switch over to a completely different model
      of what host keys are for. This comes from RFC 4462 section 2.1: the
      basic idea is that when your session is mostly bidirectionally
      authenticated by the GSSAPI exchanges happening in initial kex and
      every rekey, host keys become more or less vestigial, and their
      remaining purpose is to allow a rekey to happen if the requirements of
      the SSH protocol demand it at an awkward moment when the GSS
      credentials are not currently available (e.g. timed out and haven't
      been renewed yet). As such, there's no need for host keys to be
      _permanent_ or to be a reliable identifier of a particular host, and
      RFC 4462 allows for the possibility that they might be purely
      transient and only for this kind of emergency fallback purpose.
      
      Therefore, once PuTTY has done a GSS key exchange, it disconnects
      itself completely from the permanent host key cache functions in
      storage.h, and instead switches to a _transient_ host key cache stored
      in memory with the lifetime of just that SSH session. That cache is
      populated with keys received from the server as a side effect of GSS
      kex (via the optional SSH2_MSG_KEXGSS_HOSTKEY message), and used if
      later in the session we have to fall back to a non-GSS key exchange.
      However, in practice servers we've tested against do not send a host
      key in that way, so we also have a fallback method of populating the
      transient cache by triggering an immediate non-GSS rekey straight
      after userauth (reusing the code path we also use to turn on OpenSSH
      delayed encryption without the race condition).
      d515e4f1
  4. May 19, 2010
    • Simon Tatham's avatar
      Patch from Alejandro Sedeno, somewhat modified by me, which · 99fffd6e
      Simon Tatham authored
      reorganises the GSSAPI support so that it handles alternative
      implementations of the GSS-API. In particular, this means PuTTY can
      now talk to MIT Kerberos for Windows instead of being limited to
      SSPI. I don't know for sure whether further tweaking will be needed
      (to the UI, most likely, or to automatic selection of credentials),
      but testing reports suggest it's now at least worth committing to
      trunk to get it more widely tested.
      
      [originally from svn r8952]
      99fffd6e
Loading