mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
agent: Extend cmd KEYINFO to return data from sshcontrol.
* agent/command-ssh.c (struct control_file_s): Rename to
ssh_control_file_s.
(ssh_open_control_file, ssh_close_control_file)
(ssh_read_control_file, ssh_search_control_file): New.
(control_file_t): Rename and move to ...
* agent/agent.h (ssh_control_file_t): here.
* agent/command.c (do_one_keyinfo): Add args is_ssh, ttl, disabled,
and confirm. Rename unknown keytype indicator from '-' to 'X'. Extend
output.
(cmd_keyinfo): Add options --ssh-list and --with-ssh.
--
This extension allows the development of frontends to manage the
sshcontrol file.
Signed-off-by: Werner Koch <wk@gnupg.org>
(cherry picked from commit 50c98c7ed6
)
Conflicts in agent/command.c (due to less information printed by
keyinfo) solved.
This commit is contained in:
parent
110b52fffa
commit
88914a9e24
3 changed files with 240 additions and 40 deletions
|
@ -126,7 +126,14 @@ struct
|
|||
#define DBG_HASHING (opt.debug & DBG_HASHING_VALUE)
|
||||
#define DBG_ASSUAN (opt.debug & DBG_ASSUAN_VALUE)
|
||||
|
||||
/* Forward reference for local definitions in command.c. */
|
||||
struct server_local_s;
|
||||
|
||||
/* Declaration of objects from command-ssh.c. */
|
||||
struct ssh_control_file_s;
|
||||
typedef struct ssh_control_file_s *ssh_control_file_t;
|
||||
|
||||
/* Forward reference for local definitions in call-scd.c. */
|
||||
struct scd_local_s;
|
||||
|
||||
/* Collection of data per session (aka connection). */
|
||||
|
@ -226,6 +233,16 @@ int serve_mmapped_ssh_request (ctrl_t ctrl,
|
|||
#endif /*HAVE_W32_SYSTEM*/
|
||||
|
||||
/*-- command-ssh.c --*/
|
||||
ssh_control_file_t ssh_open_control_file (void);
|
||||
void ssh_close_control_file (ssh_control_file_t cf);
|
||||
gpg_error_t ssh_read_control_file (ssh_control_file_t cf,
|
||||
char *r_hexgrip, int *r_disabled,
|
||||
int *r_ttl, int *r_confirm);
|
||||
gpg_error_t ssh_search_control_file (ssh_control_file_t cf,
|
||||
const char *hexgrip,
|
||||
int *r_disabled,
|
||||
int *r_ttl, int *r_confirm);
|
||||
|
||||
void start_command_handler_ssh (ctrl_t, gnupg_fd_t);
|
||||
|
||||
/*-- findkey.c --*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue