summaryrefslogtreecommitdiffstats
path: root/dirmngr/loadswdb.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2017-02-23 20:14:16 +0100
committerWerner Koch <wk@gnupg.org>2017-02-23 20:14:16 +0100
commit22b69b9edfdf6e6172239cbd1075ffe29077d339 (patch)
tree65dc116408aecb6965f70dc79fba216b16e5ab46 /dirmngr/loadswdb.c
parentwks: Make sure that the draft 2 request is correctly detected. (diff)
downloadgnupg2-22b69b9edfdf6e6172239cbd1075ffe29077d339.tar.xz
gnupg2-22b69b9edfdf6e6172239cbd1075ffe29077d339.zip
dirmngr: Add new debug flag "extprog"
* dirmngr/dirmngr.h (DBG_EXTPROG_VALUE, DBG_EXTPROG): New macros. * dirmngr/dirmngr.c (debug_flags): Add flag "extprog". (handle_connections): Use a macro instead of -1 for an invalid socket. * dirmngr/loadswdb.c (verify_status_cb): Debug the gpgv call. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to '')
-rw-r--r--dirmngr/loadswdb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/dirmngr/loadswdb.c b/dirmngr/loadswdb.c
index 2d6bdc126..5a7778ddd 100644
--- a/dirmngr/loadswdb.c
+++ b/dirmngr/loadswdb.c
@@ -191,6 +191,9 @@ verify_status_cb (void *opaque, const char *keyword, char *args)
{
struct verify_status_parm_s *parm = opaque;
+ if (DBG_EXTPROG)
+ log_debug ("gpgv status: %s %s\n", keyword, args);
+
/* We care only about the first valid signature. */
if (!strcmp (keyword, "VALIDSIG") && !parm->anyvalid)
{
@@ -302,12 +305,16 @@ dirmngr_load_swdb (ctrl_t ctrl, int force)
goto leave;
}
+ if (DBG_EXTPROG)
+ log_debug ("starting gpgv\n");
err = gnupg_exec_tool_stream (gnupg_module_name (GNUPG_MODULE_NAME_GPGV),
argv, swdb, swdb_sig, NULL,
verify_status_cb, &verify_status_parm);
if (!err && verify_status_parm.sigtime == (time_t)(-1))
err = gpg_error (verify_status_parm.anyvalid? GPG_ERR_BAD_SIGNATURE
/**/ : GPG_ERR_INV_TIME );
+ if (DBG_EXTPROG)
+ log_debug ("gpgv finished: err=%d\n", err);
if (err)
goto leave;