diff options
author | Ben Kibbey <[email protected]> | 2012-01-24 01:27:14 +0000 |
---|---|---|
committer | Ben Kibbey <[email protected]> | 2012-01-24 01:40:56 +0000 |
commit | b5aa197a5f8d3ad6c484f8cc19e0b4513573a9a3 (patch) | |
tree | 1b92e1e193bac4a51d31b330d900bfa5e8b11bb8 /scd/app-openpgp.c | |
parent | Add user defined pinentry prompts for SCD. (diff) | |
download | gnupg-b5aa197a5f8d3ad6c484f8cc19e0b4513573a9a3.tar.gz gnupg-b5aa197a5f8d3ad6c484f8cc19e0b4513573a9a3.zip |
Set both the app and default SCD pin prompt at the same time.
Fixes the case when scdaemon prompts for card insertion.
* scd/app-openpgp.c (do_set_pin_prompt): Fix indentation. No longer
unset the prompt with '-' since the OPTION command without a value
does this anyway.
* scd/app.c (expand_pin_prompt): Fix indentation.
* scd/command.c (set_pinentry_prompt): Set both the default and
application prompt when available.
Diffstat (limited to 'scd/app-openpgp.c')
-rw-r--r-- | scd/app-openpgp.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c index ea3e52e6b..a5e98075c 100644 --- a/scd/app-openpgp.c +++ b/scd/app-openpgp.c @@ -3765,14 +3765,14 @@ do_set_pin_prompt(app_t app, int which, const char *prompt) switch (which) { - case PIN_SIGN_PROMPT: - p = &app->app_local->pin_prompt; - break; - case PIN_ADMIN_PROMPT: - p = &app->app_local->pin_admin_prompt; + case PIN_SIGN_PROMPT: + p = &app->app_local->pin_prompt; + break; + case PIN_ADMIN_PROMPT: + p = &app->app_local->pin_admin_prompt; + break; + default: break; - default: - break; } if (p) @@ -3780,7 +3780,7 @@ do_set_pin_prompt(app_t app, int which, const char *prompt) xfree (*p); *p = NULL; - if (prompt && *prompt != '-' && *(prompt+1) != 0) + if (prompt && *prompt) { *p = xtrystrdup (prompt); if (!*p) |