libssh2
1.\" Copyright (C) Daiki Ueno
2.\" SPDX-License-Identifier: BSD-3-Clause
3.TH libssh2_agent_get_identity 3 "23 Dec 2009" "libssh2" "libssh2"
4.SH NAME
5libssh2_agent_get_identity - get a public key off the collection of public keys managed by ssh-agent
6.SH SYNOPSIS
7.nf
8#include <libssh2.h>
9
10int
11libssh2_agent_get_identity(LIBSSH2_AGENT *agent,
12struct libssh2_agent_publickey **store,
13struct libssh2_agent_publickey *prev);
14.fi
15.SH DESCRIPTION
16\fIlibssh2_agent_get_identity(3)\fP allows an application to iterate
17over all public keys in the collection managed by ssh-agent.
18
19\fIstore\fP should point to a pointer that gets filled in to point to the
20public key data.
21
22\fIprev\fP is a pointer to a previous 'struct libssh2_agent_publickey'
23as returned by a previous invoke of this function, or NULL to get the
24first entry in the internal collection.
25.SH RETURN VALUE
26Returns 0 if everything is fine and information about a host was stored in
27the \fIstore\fP struct.
28
29Returns 1 if it reached the end of public keys.
30
31Returns negative values for error
32.SH AVAILABILITY
33Added in libssh2 1.2
34.SH SEE ALSO
35.BR libssh2_agent_list_identities(3)
36.BR libssh2_agent_userauth(3)
37