mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 03:52:49 -05:00
Rework the Pageant client code to use BinarySource.
There was a lot of ugly, repetitive, error-prone code that decoded agent responses in raw data buffers. Now my internal client query function is returning something that works as a BinarySource, so we can decode agent responses using the marshal.h system like any other SSH-formatted message in this code base. While I'm at it, I've centralised more of the parsing of key lists (saving repetition in pageant_add_key and pageant_enum_keys), including merging most of the logic between SSH-1 and SSH-2. The old functions pageant_get_keylist1 and pageant_get_keylist2 aren't exposed in pageant.h any more, because they no longer exist in that form, and also because nothing was using them anyway. (Windows Pageant was using the separate pageant_nth_ssh2_key() functions that talk directly to the core, and Unix Pageant was using the more cooked client function pageant_enum_keys.)
This commit is contained in:
@ -194,10 +194,6 @@ void pageant_listener_free(struct pageant_listen_state *pl);
|
||||
* process. (On at least one platform we want to do this in an
|
||||
* agnostic way between the two situations.)
|
||||
*
|
||||
* pageant_get_keylist{1,2} work just like pageant_make_keylist{1,2}
|
||||
* above, except that they can also cope if they have to contact an
|
||||
* external agent.
|
||||
*
|
||||
* pageant_add_keyfile() is used to load a private key from a file and
|
||||
* add it to the agent. Initially, you should call it with passphrase
|
||||
* NULL, and it will check if the key is already in the agent, and
|
||||
@ -212,8 +208,6 @@ void pageant_listener_free(struct pageant_listen_state *pl);
|
||||
* for keys that have the same trust properties). Call
|
||||
* pageant_forget_passphrases() to get rid of them all.
|
||||
*/
|
||||
void *pageant_get_keylist1(int *length);
|
||||
void *pageant_get_keylist2(int *length);
|
||||
enum {
|
||||
PAGEANT_ACTION_OK, /* success; no further action needed */
|
||||
PAGEANT_ACTION_FAILURE, /* failure; *retstr is error message */
|
||||
|
Reference in New Issue
Block a user