aboutsummaryrefslogtreecommitdiffstats
path: root/scd/scdaemon.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2019-03-28 16:05:20 +0000
committerWerner Koch <[email protected]>2019-03-28 16:38:05 +0000
commit97feef8ee94a5e1cb9daba82f108eb62122c7910 (patch)
treea0be4c1ac3b4fb7c74fbeda72dfe14f5db9640c1 /scd/scdaemon.c
parentcard: For passwd add a PIV menu and make the OpenPGP menu optional. (diff)
downloadgnupg-97feef8ee94a5e1cb9daba82f108eb62122c7910.tar.gz
gnupg-97feef8ee94a5e1cb9daba82f108eb62122c7910.zip
scd: New option --application-priority.
* scd/scdaemon.c (oApplicationPriority): New. (opts): Add "application_priority". (main): Process option. * scd/app.c (app_update_priority_list): New. (get_supported_applications): Take apps from global list. * tools/gpgconf-comp.c (gc_options_scdaemon): Add option. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'scd/scdaemon.c')
-rw-r--r--scd/scdaemon.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/scd/scdaemon.c b/scd/scdaemon.c
index 507108db0..42efb4c37 100644
--- a/scd/scdaemon.c
+++ b/scd/scdaemon.c
@@ -98,6 +98,7 @@ enum cmd_and_opt_values
oAllowAdmin,
oDenyAdmin,
oDisableApplication,
+ oApplicationPriority,
oEnablePinpadVarlen,
oListenBacklog
};
@@ -154,6 +155,8 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_s_n (oDenyAdmin, "deny-admin",
N_("deny the use of admin card commands")),
ARGPARSE_s_s (oDisableApplication, "disable-application", "@"),
+ ARGPARSE_s_s (oApplicationPriority, "application-priority",
+ N_("|LIST|Change the application priority to LIST")),
ARGPARSE_s_n (oEnablePinpadVarlen, "enable-pinpad-varlen",
N_("use variable length input for pinpad")),
ARGPARSE_s_s (oHomedir, "homedir", "@"),
@@ -436,6 +439,7 @@ main (int argc, char **argv )
struct assuan_malloc_hooks malloc_hooks;
int res;
npth_t pipecon_handler;
+ const char *application_priority = NULL;
early_system_init ();
set_strusage (my_strusage);
@@ -616,6 +620,10 @@ main (int argc, char **argv )
add_to_strlist (&opt.disabled_applications, pargs.r.ret_str);
break;
+ case oApplicationPriority:
+ application_priority = pargs.r.ret_str;
+ break;
+
case oEnablePinpadVarlen: opt.enable_pinpad_varlen = 1; break;
case oListenBacklog:
@@ -720,6 +728,7 @@ main (int argc, char **argv )
es_printf ("disable-pinpad:%lu:\n", GC_OPT_FLAG_NONE );
es_printf ("card-timeout:%lu:%d:\n", GC_OPT_FLAG_DEFAULT, 0);
es_printf ("enable-pinpad-varlen:%lu:\n", GC_OPT_FLAG_NONE );
+ es_printf ("application-priority:%lu:\n", GC_OPT_FLAG_NONE );
scd_exit (0);
}
@@ -739,6 +748,9 @@ main (int argc, char **argv )
log_debug ("... okay\n");
}
+ if (application_priority)
+ app_update_priority_list (application_priority);
+
if (pipe_server)
{
/* This is the simple pipe based server */