diff options
author | Werner Koch <wk@gnupg.org> | 2019-08-21 10:19:16 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2019-08-21 14:13:51 +0200 |
commit | c97c2e578dd173ef5e7916a3aa539b3a65a7d86d (patch) | |
tree | 23e93484755c055249ad110cd9b15a9fddd8d5cf /g10/call-agent.c | |
parent | scd: Fix check_application_conflict. (diff) | |
download | gnupg2-c97c2e578dd173ef5e7916a3aa539b3a65a7d86d.tar.xz gnupg2-c97c2e578dd173ef5e7916a3aa539b3a65a7d86d.zip |
gpg: New option --use-only-openpgp-card
* g10/gpg.c (opts): Add option.
(main): Set flag.
* g10/options.h: Add flags.use_only_openpgp_card.
* g10/call-agent.c (start_agent): Implement option.
--
With the previous patch we switch to autoselect an application
instead of requesting an openpgp card. This option allows to revert
this in case of use use cases which expected the former behaviour.
Signed-off-by: Werner Koch <wk@gnupg.org>
(cherry picked from commit c185f6dfbd1bfd809369da789239a371e9d1610e)
This was first added to the 2.2 branch.
Diffstat (limited to 'g10/call-agent.c')
-rw-r--r-- | g10/call-agent.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/g10/call-agent.c b/g10/call-agent.c index 62568fc76..9e510ae98 100644 --- a/g10/call-agent.c +++ b/g10/call-agent.c @@ -367,7 +367,9 @@ start_agent (ctrl_t ctrl, int flag_for_card) if (!(flag_for_card & FLAG_FOR_CARD_SUPPRESS_ERRORS)) rc = warn_version_mismatch (agent_ctx, SCDAEMON_NAME, 2); if (!rc) - rc = assuan_transact (agent_ctx, "SCD SERIALNO", + rc = assuan_transact (agent_ctx, + opt.flags.use_only_openpgp_card? + "SCD SERIALNO openpgp" : "SCD SERIALNO", NULL, NULL, NULL, NULL, learn_status_cb, &info); if (rc && !(flag_for_card & FLAG_FOR_CARD_SUPPRESS_ERRORS)) |