diff options
author | Werner Koch <[email protected]> | 2023-02-01 08:27:28 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2023-02-01 08:27:28 +0000 |
commit | 8b8a8b246c443d5631a88ec59b88edf00aa0ff51 (patch) | |
tree | e4ca830daaae89ce7ec0e7089c99b4042d3db145 /agent/agent.h | |
parent | gpg: New pseudo option full-help for --list-options et al. (diff) | |
download | gnupg-8b8a8b246c443d5631a88ec59b88edf00aa0ff51.tar.gz gnupg-8b8a8b246c443d5631a88ec59b88edf00aa0ff51.zip |
ssh: Allow to define the order in which keys are returned.
* agent/findkey.c (public_key_from_file): Add arg r_sshorder.
(agent_ssh_key_from_file): Ditto.
* agent/command-ssh.c (struct key_collection_item_s): New.
(struct key_collection_s): New.
(search_control_file): Add art r_lnr.
(add_to_key_array): New.
(free_key_array): New.
(compare_key_collection_items): New.
(ssh_send_available_keys): Rewrite to return the keys in the user
given order.
--
GnuPG-bug-id: 6212
We now first return the keys from active cards, followed by keys
listed in sshcontrol, finally from those with the "Use-for-ssh" key
attribute. Keys from active cards are returned sorted by their S/N.
Keys from sshcontrol are returned in the order they are given in that
file. Use-for-ssh keys are ordered by the value assigned to that key
attribute. The values for the latter are clamped at 99999.
Diffstat (limited to 'agent/agent.h')
-rw-r--r-- | agent/agent.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/agent/agent.h b/agent/agent.h index ee5c67568..303f92e50 100644 --- a/agent/agent.h +++ b/agent/agent.h @@ -479,7 +479,7 @@ gpg_error_t agent_public_key_from_file (ctrl_t ctrl, gcry_sexp_t *result); gpg_error_t agent_ssh_key_from_file (ctrl_t ctrl, const unsigned char *grip, - gcry_sexp_t *result); + gcry_sexp_t *result, int *r_order); int agent_pk_get_algo (gcry_sexp_t s_key); int agent_is_tpm2_key(gcry_sexp_t s_key); int agent_key_available (const unsigned char *grip); |