simon-git: putty (main): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Tue Dec 15 16:05:34 GMT 2020


TL;DR:
  78e006b6 Pageant: reindent the main handler function.
  3687df73 Pageant: move extension list out into header file.
  39ec2837 Pageant: new PuTTY-specific ext request, 'list-extended'.
  91c9caa3 pageant_get_keylist: use the new extended list if available.
  1a8a6f76 Pageant: accept adding an unencrypted version of an encrypted key.
  da0dc28a pageant -a: upload an unencrypted key alongside an encrypted one.
  353db313 pageant -l: indicate whether keys are encrypted.

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:           2020-12-15 16:05:34

commit 78e006b60be89d8a1b72553c3c9685602e483ccb
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=78e006b60be89d8a1b72553c3c9685602e483ccb;hp=e617a5b7689ee76152257196799e4e44441b43cb
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Dec 15 13:04:13 2020 +0000

    Pageant: reindent the main handler function.
    
    Somehow it had acquired a lot of internal 2-space indentation, which
    is out of step with the rest of this code base's style. Before I get
    into making more changes in here, let's clean it up.

 pageant.c | 428 ++++++++++++++++++++++++++++++--------------------------------
 1 file changed, 208 insertions(+), 220 deletions(-)

commit 3687df73a8a589e8030bbd938cd0cd1007a631dd
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=3687df73a8a589e8030bbd938cd0cd1007a631dd;hp=78e006b60be89d8a1b72553c3c9685602e483ccb
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Dec 15 13:24:58 2020 +0000

    Pageant: move extension list out into header file.
    
    That's a part of the protocol spec (ish), so it should be somewhere
    reasonably sensible rather than buried in the middle of a source file.

 pageant.c |  9 ---------
 pageant.h | 12 ++++++++++++
 2 files changed, 12 insertions(+), 9 deletions(-)

commit 39ec2837c8ad04092e08f0411cb028414dec103b
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=39ec2837c8ad04092e08f0411cb028414dec103b;hp=3687df73a8a589e8030bbd938cd0cd1007a631dd
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Dec 15 13:25:45 2020 +0000

    Pageant: new PuTTY-specific ext request, 'list-extended'.
    
    This is an extended version of SSH2_AGENTC_REQUEST_IDENTITIES, which
    augments each entry in the returned key list with an extra field
    containing additional data about the key.
    
    The initial contents of that extra field are a pair of flags
    indicating whether the key is currently stored in the agent encrypted,
    decrypted or both.
    
    The idea is that this will permit a Pageant-aware client to make
    decisions based on that. For a start, the output key list can mention
    it to the user; also, if you try to add a key unencrypted when it's
    already present, we can discriminate based on whether it's already
    present _unencrypted_

 pageant.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 pageant.h |  4 ++++
 2 files changed, 58 insertions(+), 3 deletions(-)

commit 91c9caa3fecbc4d84da3acf3e4bff50699972ac9
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=91c9caa3fecbc4d84da3acf3e4bff50699972ac9;hp=39ec2837c8ad04092e08f0411cb028414dec103b
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Dec 15 13:40:51 2020 +0000

    pageant_get_keylist: use the new extended list if available.
    
    Now the returned list of keys will have a flags word for each key, if
    the agent was willing to provide one.

 pageant.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 53 insertions(+), 11 deletions(-)

commit 1a8a6f76a4bbfa5677c816798df8ea74bd9b5522
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=1a8a6f76a4bbfa5677c816798df8ea74bd9b5522;hp=91c9caa3fecbc4d84da3acf3e4bff50699972ac9
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Dec 15 13:54:55 2020 +0000

    Pageant: accept adding an unencrypted version of an encrypted key.
    
    Now, if you send SSH2_AGENTC_ADD_IDENTITY with a cleartext private key
    blob, and the agent already contains an encrypted-only version of the
    same key, it will drop the cleartext version in alongside it,
    effectively decrypting the key as if the passphrase had been typed.

 pageant.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

commit da0dc28ab308305cfd8f705727a7f0072a504d38
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=da0dc28ab308305cfd8f705727a7f0072a504d38;hp=1a8a6f76a4bbfa5677c816798df8ea74bd9b5522
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Dec 15 13:46:39 2020 +0000

    pageant -a: upload an unencrypted key alongside an encrypted one.
    
    Now, if you have a given key stored encrypted in your agent and you
    say 'pageant -a [same key]' (without -E), Pageant will notice (via the
    new extended key list request) that the key is currently encrypted in
    the agent, and that you're trying to add it unencrypted. In this
    situation it won't abort the attempt, and will try to add the key
    anyway, so that it becomes decrypted in your agent.

 pageant.c | 25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)

commit 353db3132f4f680ac5df742cfe9f6be80652397e
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=353db3132f4f680ac5df742cfe9f6be80652397e;hp=da0dc28ab308305cfd8f705727a7f0072a504d38
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Dec 15 14:07:29 2020 +0000

    pageant -l: indicate whether keys are encrypted.
    
    The callback function to pageant_enum_keys now takes a flags
    parameter, which receives the flags word from the extended key list
    request, if available. (If not, then the flags word is passed as
    zero.)
    
    The only callback that uses this parameter is the one for printing
    text output from 'pageant -l', which uses it to print a suffix on each
    line, indicating whether the key is stored encrypted only (so it will
    need a passphrase on next use), or whether it's stored both encrypted
    _and_ unencrypted (so that 'pageant -R' will be able to return it to
    the former state).

 pageant.c     |  6 ++++--
 pageant.h     |  1 +
 unix/uxpgnt.c | 15 +++++++++++----
 3 files changed, 16 insertions(+), 6 deletions(-)



More information about the tartarus-commits mailing list