scd:nks: Add do_with_keygrip and implement a cache.
* scd/app-nks.c (struct fid_cache_s): New. (struct app_local_s): Add field 'fid_cache'. (do_deinit): Release the cache. (keygripstr_from_pk_file): Implement the cache. (find_fid_by_keyref): New (do_sign, do_decipher): Use new function. (do_with_keygrip): New.
Backported-from-master: 1e72a1a218490c0fc07811a02ddad6cc38913f77
- Signed-off-by: Werner Koch <wk@gnupg.org>
- GnuPG-bug-id: T6252