simon-git: putty (master): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Mon Feb 10 20:50:56 GMT 2020
TL;DR:
01488614 Pageant: handle agent extension messages more correctly.
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: 2020-02-10 20:50:56
commit 014886142cf81a6d427a91882822f8ed9bd01ddf
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=014886142cf81a6d427a91882822f8ed9bd01ddf;hp=518c0f0ea136a43027dacb034efcbb94ff2fbf83
Author: Simon Tatham <anakin at pobox.com>
Date: Mon Feb 10 20:45:31 2020 +0000
Pageant: handle agent extension messages more correctly.
Reading draft-miller-ssh-agent-04 more carefully, I see that I missed
a few things from the extension-message spec. Firstly, there's an
extension request "query" which is supposed to list all the extensions
you support. Secondly, if you recognise an extension-request name but
are then unable to fulfill the request for some other reason, you're
supposed to return a new kind of failure message that's distinct from
SSH_AGENT_FAILURE, because for extensions, the latter is reserved for
"I don't even know what this extension name means at all".
I've fixed both of those bugs in Pageant by making a centralised map
of known extension names to an enumeration of internal ids, and an
array containing the name for each id. So we can reliably answer the
"query" extension by iterating over that array, and also use the same
array to recognise known extensions up front and give them centralised
processing (in particular, resetting the failure-message type) before
switching on the particular extension index.
pageant.c | 135 +++++++++++++++++++++++++++++++++++++++++---------------------
ssh.h | 1 +
2 files changed, 90 insertions(+), 46 deletions(-)
More information about the tartarus-commits
mailing list