diff options
author | NIIBE Yutaka <[email protected]> | 2015-04-03 08:39:59 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2015-04-03 08:39:59 +0000 |
commit | f82c4a6d0d76e716b6a7b22ca964fa2da1f962a0 (patch) | |
tree | 4a2ff1ab9e04bc630126719fce01d097308028e3 /g10/card-util.c | |
parent | agent: Add --force option for LEARN. (diff) | |
download | gnupg-f82c4a6d0d76e716b6a7b22ca964fa2da1f962a0.tar.gz gnupg-f82c4a6d0d76e716b6a7b22ca964fa2da1f962a0.zip |
g10: Fix keytocard.
g10/call-agent.h (agent_scd_learn): Add FORCE option.
g10/call-agent.c (agent_scd_learn): Implement FORCE option.
g10/keygen.c (gen_card_key): Follow the change of option.
g10/card-util.c (change_pin, card_status, factory_reset): Likewise.
g10/keyedit.c (keyedit_menu): Update private key storage by
agent_scd_learn.
--
This is not a perfect solution since there is a possibility user
unplug card before quitting 'gpg --keyedit' session. Usually,
it works well.
GnuPG-bug-id: 1846
Diffstat (limited to '')
-rw-r--r-- | g10/card-util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/g10/card-util.c b/g10/card-util.c index 4b584bfed..a291a075b 100644 --- a/g10/card-util.c +++ b/g10/card-util.c @@ -81,7 +81,7 @@ change_pin (int unblock_v2, int allow_admin) struct agent_card_info_s info; int rc; - rc = agent_scd_learn (&info); + rc = agent_scd_learn (&info, 0); if (rc) { log_error (_("OpenPGP card not available: %s\n"), @@ -374,7 +374,7 @@ card_status (estream_t fp, char *serialno, size_t serialnobuflen) if (serialno && serialnobuflen) *serialno = 0; - rc = agent_scd_learn (&info); + rc = agent_scd_learn (&info, 0); if (rc) { if (opt.with_colons) @@ -1702,7 +1702,7 @@ factory_reset (void) but tries to find out something about the card first. */ - err = agent_scd_learn (&info); + err = agent_scd_learn (&info, 0); if (gpg_err_code (err) == GPG_ERR_OBJ_TERM_STATE && gpg_err_source (err) == GPG_ERR_SOURCE_SCD) termstate = 1; |