1libssh2_agent_get_identity(3) libssh2 libssh2_agent_get_identity(3)
2
3
4
6 libssh2_agent_get_identity - get a public key off the collection of
7 public keys managed by ssh-agent
8
10 #include <libssh2.h>
11
12 int
13 libssh2_agent_get_identity(LIBSSH2_AGENT *agent,
14 struct libssh2_agent_publickey **store,
15 struct libssh2_agent_publickey *prev);
16
18 libssh2_agent_get_identity(3) allows an application to iterate over all
19 public keys in the collection managed by ssh-agent.
20
21 store should point to a pointer that gets filled in to point to the
22 public key data.
23
24 prev is a pointer to a previous 'struct libssh2_agent_publickey' as re‐
25 turned by a previous invoke of this function, or NULL to get the first
26 entry in the internal collection.
27
29 Returns 0 if everything is fine and information about a host was stored
30 in the store struct.
31
32 Returns 1 if it reached the end of public keys.
33
34 Returns negative values for error
35
37 Added in libssh2 1.2
38
40 libssh2_agent_list_identities(3) libssh2_agent_userauth(3)
41
42
43
44libssh2 23 Dec 2009 libssh2_agent_get_identity(3)