diff options
author | NIIBE Yutaka <[email protected]> | 2022-06-22 06:45:18 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2022-06-22 06:45:18 +0000 |
commit | 30b54a0ebbaa8ac491710ad1b4f2fbd1b5814bce (patch) | |
tree | bcad2e6b65096f4eb6478519553d7d550002358e /agent/agent.h | |
parent | agent,gpg,tools: Fix use of log_get_fd. (diff) | |
download | gnupg-30b54a0ebbaa8ac491710ad1b4f2fbd1b5814bce.tar.gz gnupg-30b54a0ebbaa8ac491710ad1b4f2fbd1b5814bce.zip |
agent: Add KEYATTR command.
* agent/agent.h (agent_raw_key_from_file): Add R_KEYMETA argument.
(agent_update_private_key): New.
* agent/command-ssh.c (data_sign): Follow the change of the function
agent_raw_key_from_file.
* agent/command.c (do_one_keyinfo): Likewise.
(cmd_keyattr): New.
(register_commands): Add an entry of cmd_keyattr.
* agent/findkey.c (agent_update_private_key): New.
(agent_raw_key_from_file): Add R_KEYMETA argument.
--
GnuPG-bug-id: 5988
Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'agent/agent.h')
-rw-r--r-- | agent/agent.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/agent/agent.h b/agent/agent.h index d33b8cd34..30f30200d 100644 --- a/agent/agent.h +++ b/agent/agent.h @@ -37,6 +37,7 @@ #include "../common/sysutils.h" /* (gnupg_fd_t) */ #include "../common/session-env.h" #include "../common/shareddefs.h" +#include "../common/name-value.h" /* To convey some special hash algorithms we use algorithm numbers reserved for application use. */ @@ -471,7 +472,7 @@ gpg_error_t agent_key_from_file (ctrl_t ctrl, gcry_sexp_t *result, char **r_passphrase, time_t *r_timestamp); gpg_error_t agent_raw_key_from_file (ctrl_t ctrl, const unsigned char *grip, - gcry_sexp_t *result); + gcry_sexp_t *result, nvc_t *r_keymeta); gpg_error_t agent_public_key_from_file (ctrl_t ctrl, const unsigned char *grip, gcry_sexp_t *result); @@ -488,6 +489,7 @@ gpg_error_t agent_key_info_from_file (ctrl_t ctrl, const unsigned char *grip, gpg_error_t agent_delete_key (ctrl_t ctrl, const char *desc_text, const unsigned char *grip, int force, int only_stubs); +gpg_error_t agent_update_private_key (const unsigned char *grip, nvc_t pk); /*-- call-pinentry.c --*/ void initialize_module_call_pinentry (void); |