mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 11:32:48 -05:00
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.
This commit is contained in:
Reference in New Issue
Block a user