aboutsummaryrefslogtreecommitdiffstats
path: root/agent
diff options
context:
space:
mode:
Diffstat (limited to 'agent')
-rw-r--r--agent/agent.h3
-rw-r--r--agent/call-pinentry.c2
-rw-r--r--agent/gpg-agent.c4
3 files changed, 8 insertions, 1 deletions
diff --git a/agent/agent.h b/agent/agent.h
index b374ee867..4d28effa4 100644
--- a/agent/agent.h
+++ b/agent/agent.h
@@ -67,6 +67,9 @@ struct
char *startup_lc_ctype;
char *startup_lc_messages;
+ /* Enable pinentry debugging (--debug 1024 should also be used). */
+ int debug_pinentry;
+
/* Filename of the program to start as pinentry. */
const char *pinentry_program;
diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c
index 0a0f95be8..8cbb33edd 100644
--- a/agent/call-pinentry.c
+++ b/agent/call-pinentry.c
@@ -332,7 +332,7 @@ start_pinentry (ctrl_t ctrl)
easier to read. We might want to add a new debug option to enable
pinentry logging. */
#ifdef ASSUAN_NO_LOGGING
- assuan_set_flag (ctx, ASSUAN_NO_LOGGING, 1);
+ assuan_set_flag (ctx, ASSUAN_NO_LOGGING, !opt.debug_pinentry);
#endif
/* Connect to the pinentry and perform initial handshaking. Note
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index c27de89b6..c846ab494 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -79,6 +79,7 @@ enum cmd_and_opt_values
oDebugLevel,
oDebugWait,
oDebugQuickRandom,
+ oDebugPinentry,
oNoGreeting,
oNoOptions,
oHomedir,
@@ -154,6 +155,7 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_s_s (oDebugLevel, "debug-level", "@"),
ARGPARSE_s_i (oDebugWait," debug-wait", "@"),
ARGPARSE_s_n (oDebugQuickRandom, "debug-quick-random", "@"),
+ ARGPARSE_s_n (oDebugPinentry, "debug-pinentry", "@"),
ARGPARSE_s_n (oNoDetach, "no-detach", N_("do not detach from the console")),
ARGPARSE_s_n (oNoGrab, "no-grab", N_("do not grab keyboard and mouse")),
@@ -539,6 +541,7 @@ parse_rereadable_options (ARGPARSE_ARGS *pargs, int reread)
opt.verbose = 0;
opt.debug = 0;
opt.no_grab = 0;
+ opt.debug_pinentry = 0;
opt.pinentry_program = NULL;
opt.pinentry_touch_file = NULL;
opt.scdaemon_program = NULL;
@@ -567,6 +570,7 @@ parse_rereadable_options (ARGPARSE_ARGS *pargs, int reread)
case oDebug: opt.debug |= pargs->r.ret_ulong; break;
case oDebugAll: opt.debug = ~0; break;
case oDebugLevel: debug_level = pargs->r.ret_str; break;
+ case oDebugPinentry: opt.debug_pinentry = 1; break;
case oLogFile:
if (!reread)