Let gpgsm do the actual key selection work.
* src/agent.c (scute_agent_is_trusted): Make FPR arg const. * src/cert.h (enum keylist_modes): new. * src/cert-gpgsm.c (scute_gpgsm_search_certs_by_fpr): Remove. (scute_gpgsm_search_certs_by_grip): Rename to ... (scute_gpgsm_search_certs): this. Remove the same named old fucntion. Change args and rewrite. (export_cert_compat): Remove. (export_cert): Make FPR arg const. Remove trailing LF from assuna command. (search_certs): Rename to keylist_cb. Fold the double callbacks into just one. (MAX_LINE_LEN): Define based on ASSUAN_LINELENGTH.
This patch cleans up a lot of cruft and also replaces the Scute
internal selection of keys by simply asking gpgsm to only return the
requested keys. This speeds up things a lot.
- Signed-off-by: Werner Koch <wk@gnupg.org>