1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

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>
This commit is contained in:
Werner Koch 2017-02-23 20:14:16 +01:00
parent d30e17ac62
commit 22b69b9edf
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
4 changed files with 14 additions and 4 deletions

View file

@ -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;