Hi!
Daiki Ueno <ueno_at_unixuser.org> writes:
> If it looks OK, I will try to implement it this weekend.
The task took longer than I expected ;-)
The attached is the initial implementation.
Notes:
- The API changed from the proposal after the manner of the knownhost API.
Now the following 7 new functions added. See the
example/simple/ssh2_agent.c for the usage.
LIBSSH2_AGENT *libssh2_agent_init(LIBSSH2_SESSION *session);
int libssh2_agent_connect(LIBSSH2_AGENT *agent);
int libssh2_agent_list_identities(LIBSSH2_AGENT *agent);
int libssh2_agent_get_identity(LIBSSH2_AGENT *agent,
struct libssh2_agent_publickey **store,
struct libssh2_agent_publickey *prev);
int libssh2_agent_userauth(LIBSSH2_AGENT *agent,
const char *username,
struct libssh2_agent_publickey *identity);
int libssh2_agent_disconnect(LIBSSH2_AGENT *agent);
int libssh2_agent_free(LIBSSH2_AGENT *agent);
- libssh2_agent_{add,del}_identity() could also be added. It will be
useful for testing, but it will require extension to the internal
hostkey interface to encode DSA/RSA parameters in the agent protocol.
- Pageant support is not yet implemented but it should be easy if I take
some code from the Putty source (putty/windows/winpgnt.c). Is that
OK? The Putty License is the MIT License.
I would appreciate any comments.
Regards,
-- Daiki UenoReceived on 2009-12-16