diff options
author | NIIBE Yutaka <[email protected]> | 2020-01-17 06:11:02 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2020-01-17 07:09:01 +0000 |
commit | 853d5b7677ea01f65c9bc5160cd8509b62f486f7 (patch) | |
tree | 848bb0adc423a9abbd67d716a641eb6b7849815f /g10/revoke.c | |
parent | card: Allow switching of cards and applications. (diff) | |
download | gnupg-853d5b7677ea01f65c9bc5160cd8509b62f486f7.tar.gz gnupg-853d5b7677ea01f65c9bc5160cd8509b62f486f7.zip |
gpg: Prepare enhancement of agent_probe_secret_key.
* g10/call-agent.c (agent_probe_secret_key): Change semantics of
return value.
* g10/call-agent.h (agent_probe_secret_key): Change comment.
* g10/delkey.c (do_delete_key): Follow the change.
* g10/getkey.c (get_seckey, parse_def_secret_key): Likewise.
(finish_lookup, have_secret_key_with_kid): Likewise.
* g10/gpgv.c (agent_probe_secret_key): Likewise.
* g10/keyedit.c (keyedit_menu, quick_find_keyblock): Likewise.
(show_key_with_all_names_colon): Likewise.
* g10/revoke.c (gen_desig_revoke, gen_revoke): Likewise
* g10/test-stubs.c (agent_probe_secret_key): Likewise.
--
GnuPG-bug-id: 3416
Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'g10/revoke.c')
-rw-r--r-- | g10/revoke.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/g10/revoke.c b/g10/revoke.c index 0e39eca61..5262c17bf 100644 --- a/g10/revoke.c +++ b/g10/revoke.c @@ -315,8 +315,7 @@ gen_desig_revoke (ctrl_t ctrl, const char *uname, strlist_t locusr) tty_printf(_("(This is a sensitive revocation key)\n")); tty_printf("\n"); - rc = agent_probe_secret_key (ctrl, pk2); - if (rc) + if (!agent_probe_secret_key (ctrl, pk2)) { tty_printf (_("Secret key is not available.\n")); continue; @@ -713,9 +712,9 @@ gen_revoke (ctrl_t ctrl, const char *uname) BUG (); psk = node->pkt->pkt.public_key; - rc = agent_probe_secret_key (NULL, psk); - if (rc) + if (!agent_probe_secret_key (NULL, psk)) { + rc = gpg_error (GPG_ERR_NO_SECKEY); log_error (_("secret key \"%s\" not found: %s\n"), uname, gpg_strerror (rc)); goto leave; |