diff options
author | James Bottomley via Gnupg-devel <[email protected]> | 2020-06-14 17:26:45 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2020-06-24 08:11:47 +0000 |
commit | 0e3b2955aee2b9b62707d138caa4329eb31d4f93 (patch) | |
tree | b87e44c6513af97b7abedd070e364ef199004aa5 /agent/agent.h | |
parent | gpg,agent: Support Ed448 signing. (diff) | |
download | gnupg-0e3b2955aee2b9b62707d138caa4329eb31d4f93.tar.gz gnupg-0e3b2955aee2b9b62707d138caa4329eb31d4f93.zip |
agent: expose shadow key type
--
For TPM support it is necessary to indroduce another type of shadow
key, so allow other agent functions to extract the type so they can
make the right decisions based on it.
Signed-off-by: James Bottomley <[email protected]>
Minor editorial changes by wk
Diffstat (limited to 'agent/agent.h')
-rw-r--r-- | agent/agent.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/agent/agent.h b/agent/agent.h index de0d25fb3..e2d2df4ee 100644 --- a/agent/agent.h +++ b/agent/agent.h @@ -451,7 +451,8 @@ int agent_pk_get_algo (gcry_sexp_t s_key); int agent_key_available (const unsigned char *grip); gpg_error_t agent_key_info_from_file (ctrl_t ctrl, const unsigned char *grip, int *r_keytype, - unsigned char **r_shadow_info); + unsigned char **r_shadow_info, + unsigned char **r_shadow_info_type); gpg_error_t agent_delete_key (ctrl_t ctrl, const char *desc_text, const unsigned char *grip, int force, int only_stubs); @@ -535,8 +536,15 @@ unsigned char *make_shadow_info (const char *serialno, const char *idstring); int agent_shadow_key (const unsigned char *pubkey, const unsigned char *shadow_info, unsigned char **result); +int agent_shadow_key_type (const unsigned char *pubkey, + const unsigned char *shadow_info, + const unsigned char *type, + unsigned char **result); gpg_error_t agent_get_shadow_info (const unsigned char *shadowkey, unsigned char const **shadow_info); +gpg_error_t agent_get_shadow_info_type (const unsigned char *shadowkey, + unsigned char const **shadow_info, + unsigned char **shadow_type); gpg_error_t parse_shadow_info (const unsigned char *shadow_info, char **r_hexsn, char **r_idstr, int *r_pinlen); gpg_error_t s2k_hash_passphrase (const char *passphrase, int hashalgo, |