24#include "libssh/libssh.h"
27#define SSH_AGENTC_REQUEST_RSA_IDENTITIES 1
28#define SSH_AGENT_RSA_IDENTITIES_ANSWER 2
29#define SSH_AGENTC_RSA_CHALLENGE 3
30#define SSH_AGENT_RSA_RESPONSE 4
31#define SSH_AGENT_FAILURE 5
32#define SSH_AGENT_SUCCESS 6
33#define SSH_AGENTC_ADD_RSA_IDENTITY 7
34#define SSH_AGENTC_REMOVE_RSA_IDENTITY 8
35#define SSH_AGENTC_REMOVE_ALL_RSA_IDENTITIES 9
38#define SSH2_AGENTC_REQUEST_IDENTITIES 11
39#define SSH2_AGENT_IDENTITIES_ANSWER 12
40#define SSH2_AGENTC_SIGN_REQUEST 13
41#define SSH2_AGENT_SIGN_RESPONSE 14
42#define SSH2_AGENTC_ADD_IDENTITY 17
43#define SSH2_AGENTC_REMOVE_IDENTITY 18
44#define SSH2_AGENTC_REMOVE_ALL_IDENTITIES 19
47#define SSH_AGENTC_ADD_SMARTCARD_KEY 20
48#define SSH_AGENTC_REMOVE_SMARTCARD_KEY 21
51#define SSH_AGENTC_LOCK 22
52#define SSH_AGENTC_UNLOCK 23
55#define SSH_AGENTC_ADD_RSA_ID_CONSTRAINED 24
56#define SSH2_AGENTC_ADD_ID_CONSTRAINED 25
57#define SSH_AGENTC_ADD_SMARTCARD_KEY_CONSTRAINED 26
59#define SSH_AGENT_CONSTRAIN_LIFETIME 1
60#define SSH_AGENT_CONSTRAIN_CONFIRM 2
63#define SSH2_AGENT_FAILURE 30
66#define SSH_COM_AGENT2_FAILURE 102
68#define SSH_AGENT_OLD_SIGNATURE 0x01
70#define SSH_AGENT_RSA_SHA2_256 0x02
71#define SSH_AGENT_RSA_SHA2_512 0x04
77struct ssh_agent_struct {
78 struct ssh_socket_struct *sock;
90struct ssh_agent_struct *ssh_agent_new(
struct ssh_session_struct *session);
92void ssh_agent_close(
struct ssh_agent_struct *agent);
99void ssh_agent_free(
struct ssh_agent_struct *agent);
108int ssh_agent_is_running(
struct ssh_session_struct *session);
110uint32_t ssh_agent_get_ident_count(
struct ssh_session_struct *session);
112ssh_key ssh_agent_get_next_ident(
struct ssh_session_struct *session,
115ssh_key ssh_agent_get_first_ident(
struct ssh_session_struct *session,
118ssh_string ssh_agent_sign_data(ssh_session session,
119 const ssh_key pubkey,
120 struct ssh_buffer_struct *data);