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

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 <wk@gnupg.org>
This commit is contained in:
Werner Koch 2019-03-28 17:05:20 +01:00
parent 80c069b5e1
commit 97feef8ee9
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
5 changed files with 91 additions and 18 deletions

View file

@ -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 */