1libssh2_agent_sign(3)               libssh2              libssh2_agent_sign(3)
2
3
4

NAME

6       libssh2_agent_sign - sign data, with the help of ssh-agent
7

SYNOPSIS

9       #include <libssh2.h>
10
11       int
12       libssh2_agent_sign(LIBSSH2_AGENT *agent,
13                          struct libssh2_agent_publickey *identity,
14                          unsigned char **sig,
15                          size_t *s_len,
16                          const unsigned char *data,
17                          size_t d_len,
18                          const char *method,
19                          unsigned int method_len);
20

DESCRIPTION

22       agent - ssh-agent handle as returned by libssh2_agent_init(3)
23
24       identity  -  Public  key  to  authenticate  with,  as  returned by lib‐
25       ssh2_agent_get_identity(3)
26
27       sig - A pointer to a buffer in which to place the signature. The caller
28       is responsible for freeing the signature with LIBSSH2_FREE.
29
30       s_len - A pointer to the length of the sig parameter.
31
32       data - The data to sign.
33
34       d_len - The length of the data parameter.
35
36       method  - A buffer indicating the signing method. This should match the
37       string at the start of identity->blob.
38
39       method_len - The length of the method parameter.
40
41       Sign data using an ssh-agent. This function can be used in  a  callback
42       registered  with  libssh2_session_callback_set(3)  using  LIBSSH2_CALL‐
43       BACK_AUTHAGENT_SIGN to sign an authentication challenge from a  server.
44       However, the client is responsible for implementing the code that calls
45       this callback in response to a SSH2_AGENTC_SIGN_REQUEST message.
46

RETURN VALUE

48       Returns 0 if succeeded, or a negative value for error.
49

AVAILABILITY

51       Added in libssh2 1.11.0
52

SEE ALSO

54       libssh2_agent_init(3) libssh2_agent_get_identity(3) libssh2_agent_user‐
55       auth(3) libssh2_session_callback_set(3)
56
57
58
59libssh2                           1 Oct 2022             libssh2_agent_sign(3)
Impressum