diff options
author | Werner Koch <wk@gnupg.org> | 2019-09-09 14:34:09 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2019-09-09 15:01:47 +0200 |
commit | aba82684fe14289cf62b4694bc398f3a274b4762 (patch) | |
tree | b66c13bcb29f62f64c4aaa603d510b0fd65cb7cc /g10/delkey.c | |
parent | kbx: Fix keyboxd search first. (diff) | |
download | gnupg2-aba82684fe14289cf62b4694bc398f3a274b4762.tar.xz gnupg2-aba82684fe14289cf62b4694bc398f3a274b4762.zip |
gpg: New option --use-keyboxd.
* g10/gpg.c (oUseKeyboxd,oKeyboxdProgram): New consts.
(opts): New options --use-keyboxd and --keyboxd-program.
(main): Implement them.
* g10/keydb.c: Move some defs out to ...
* g10/keydb-private.h: new file.
* g10/keydb.c: prefix function names with "internal" and move original
functions to ...
* g10/call-keyboxd.c: new file. Divert to the internal fucntion if
--use-keyboxd is used. Add a CTRL arg to most fucntions and change
all callers.
* g10/Makefile.am (common_source): Add new files.
(noinst_PROGRAMS): Do bot build gpgcompose.
--
Note that this is just the framework with only a basic implementation
of searching via keyboxd.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/delkey.c')
-rw-r--r-- | g10/delkey.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/g10/delkey.c b/g10/delkey.c index b5ab47434..8a7144ace 100644 --- a/g10/delkey.c +++ b/g10/delkey.c @@ -65,7 +65,7 @@ do_delete_key (ctrl_t ctrl, const char *username, int secret, int force, *r_sec_avail = 0; - hd = keydb_new (); + hd = keydb_new (ctrl); if (!hd) return gpg_error_from_syserror (); @@ -131,7 +131,7 @@ do_delete_key (ctrl_t ctrl, const char *username, int secret, int force, if (!secret && !force) { - if (have_secret_key_with_kid (keyid)) + if (have_secret_key_with_kid (ctrl, keyid)) { *r_sec_avail = 1; err = gpg_error (GPG_ERR_EOF); @@ -141,7 +141,7 @@ do_delete_key (ctrl_t ctrl, const char *username, int secret, int force, err = 0; } - if (secret && !have_secret_key_with_kid (keyid)) + if (secret && !have_secret_key_with_kid (ctrl, keyid)) { err = gpg_error (GPG_ERR_NOT_FOUND); log_error (_("key \"%s\" not found\n"), username); |