agent: expose shadow key type
* agent/findkey.c (agent_key_info_from_file): Add new return arg r_shadow_info_type. * agent/protect.c (agent_shadow_key): Factor code out to ... (agent_shadow_key_type): new. Add arg 'type'. (agent_get_shadow_info): Factor code out to ... (agent_get_shadow_info_type): new. Add arg 'shadow_type'. (agent_is_tpm2_key): New. (agent_get_shadow_type): New. * agent/command.c (do_one_keyinfo): Get and check the shadow_info_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.
Added ChangeLog entries.
- Signed-off-by: Werner Koch <wk@gnupg.org>