diff options
author | Fabiano FidĂȘncio <fidencio@redhat.com> | 2015-07-02 15:29:06 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2015-07-07 13:24:55 +0200 |
commit | 2bf6e66ffe9f617ec56a4cc4561c533a81d80cdf (patch) | |
tree | 9aa7fcb7629fb4abe859c8d9735b6b520a9e1987 /src/channels.c | |
parent | 728c2fbd017451a868ed9471c9d001f6d4ffff96 (diff) | |
download | libssh-2bf6e66ffe9f617ec56a4cc4561c533a81d80cdf.tar.gz libssh-2bf6e66ffe9f617ec56a4cc4561c533a81d80cdf.tar.xz libssh-2bf6e66ffe9f617ec56a4cc4561c533a81d80cdf.zip |
client: handle agent forward open requests with callbacks
Signed-off-by: Fabiano FidĂȘncio <fidencio@redhat.com>
Reviewed-by: Aris Adamantiadis <aris@badcode.be>
Diffstat (limited to 'src/channels.c')
-rw-r--r-- | src/channels.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/channels.c b/src/channels.c index 2c841ed3..d8cd1907 100644 --- a/src/channels.c +++ b/src/channels.c @@ -1982,6 +1982,25 @@ ssh_channel ssh_channel_accept_x11(ssh_channel channel, int timeout_ms) { } /** + * @brief Send an "auth-agent-req" channel request over an existing session channel. + * + * This client-side request will enable forwarding the agent over an secure tunnel. + * When the server is ready to open one authentication agent channel, an + * ssh_channel_open_request_auth_agent_callback event will be generated. + * + * @param[in] channel The channel to send signal. + * + * @return SSH_OK on success, SSH_ERROR if an error occurred + */ +int ssh_channel_request_auth_agent(ssh_channel channel) { + if (channel == NULL) { + return SSH_ERROR; + } + + return channel_request(channel, "auth-agent-req@openssh.com", NULL, 0); +} + +/** * @internal * * @brief Handle a SSH_REQUEST_SUCCESS packet normally sent after a global |