diff --git a/src/options.c b/src/options.c index cfaa4c8e..23ce086e 100644 --- a/src/options.c +++ b/src/options.c @@ -1577,6 +1577,16 @@ int ssh_options_get_port(ssh_session session, unsigned int* port_target) { * remote host. When not explicitly set, it will be read * from the ~/.ssh/config file. * + * - SSH_OPTIONS_IDENTITY_AGENT: + * Get the socket of the authentication agent to use, as it is + * configured by `IdentityAgent`. When not explicitly set, it + * will be read from the ~/.ssh/config file. + * + * - SSH_OPTIONS_IDENTITIES_ONLY: + * Get whether only the configured identities may be used for + * authentication, as "yes" or "no". When not explicitly set, + * it will be read from the ~/.ssh/config file. + * * - SSH_OPTIONS_GLOBAL_KNOWNHOSTS: * Get the path to the global known_hosts file being used. * @@ -1694,6 +1704,15 @@ int ssh_options_get(ssh_session session, enum ssh_options_e type, char** value) src = session->opts.ProxyCommand; break; + case SSH_OPTIONS_IDENTITY_AGENT: + src = session->opts.agent_socket; + break; + + case SSH_OPTIONS_IDENTITIES_ONLY: + /* This option is a boolean, it is reported the same way it is spelled in the configuration file. */ + src = (char *)(session->opts.identities_only ? "yes" : "no"); + break; + case SSH_OPTIONS_KNOWNHOSTS: src = session->opts.knownhosts; break;