mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-12 22:11:29 +02:00
* scdaemon.c, scdaemon.h: New option --pcsc-driver.
* apdu.c (apdu_open_reader): Use that option here instead of a hardcoded one.
This commit is contained in:
parent
5e380eb635
commit
e3cdba8386
@ -1,3 +1,9 @@
|
|||||||
|
2003-08-19 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
|
* scdaemon.c, scdaemon.h: New option --pcsc-driver.
|
||||||
|
* apdu.c (apdu_open_reader): Use that option here instead of a
|
||||||
|
hardcoded one.
|
||||||
|
|
||||||
2003-08-18 Werner Koch <wk@gnupg.org>
|
2003-08-18 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
* Makefile.am: Add OPENSC_LIBS to all programs.
|
* Makefile.am: Add OPENSC_LIBS to all programs.
|
||||||
|
@ -798,6 +798,12 @@ apdu_open_reader (const char *portstr)
|
|||||||
{
|
{
|
||||||
void *handle;
|
void *handle;
|
||||||
|
|
||||||
|
if (!opt.pcsc_driver || !*opt.pcsc_driver)
|
||||||
|
{
|
||||||
|
log_error ("no PC/SC driver has been specified\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
handle = dlopen ("libpcsclite.so", RTLD_LAZY);
|
handle = dlopen ("libpcsclite.so", RTLD_LAZY);
|
||||||
if (!handle)
|
if (!handle)
|
||||||
{
|
{
|
||||||
|
@ -70,6 +70,7 @@ enum cmd_and_opt_values
|
|||||||
oBatch,
|
oBatch,
|
||||||
oReaderPort,
|
oReaderPort,
|
||||||
octapiDriver,
|
octapiDriver,
|
||||||
|
opcscDriver,
|
||||||
oDisableOpenSC,
|
oDisableOpenSC,
|
||||||
|
|
||||||
aTest };
|
aTest };
|
||||||
@ -94,7 +95,8 @@ static ARGPARSE_OPTS opts[] = {
|
|||||||
{ oNoDetach, "no-detach" ,0, N_("do not detach from the console")},
|
{ oNoDetach, "no-detach" ,0, N_("do not detach from the console")},
|
||||||
{ oLogFile, "log-file" ,2, N_("use a log file for the server")},
|
{ oLogFile, "log-file" ,2, N_("use a log file for the server")},
|
||||||
{ oReaderPort, "reader-port", 2, N_("|N|connect to reader at port N")},
|
{ oReaderPort, "reader-port", 2, N_("|N|connect to reader at port N")},
|
||||||
{ octapiDriver, "ctapi-driver", 2, N_("NAME|use NAME as ctAPI driver")},
|
{ octapiDriver, "ctapi-driver", 2, N_("NAME|use NAME as ct-API driver")},
|
||||||
|
{ opcscDriver, "pcsc-driver", 2, N_("NAME|use NAME as PC/SC driver")},
|
||||||
{ oDisableOpenSC, "disable-opensc", 0,
|
{ oDisableOpenSC, "disable-opensc", 0,
|
||||||
#ifdef HAVE_OPENSC
|
#ifdef HAVE_OPENSC
|
||||||
N_("Do not use the OpenSC layer")
|
N_("Do not use the OpenSC layer")
|
||||||
@ -266,6 +268,11 @@ main (int argc, char **argv )
|
|||||||
|
|
||||||
may_coredump = disable_core_dumps ();
|
may_coredump = disable_core_dumps ();
|
||||||
|
|
||||||
|
/* Set default options. */
|
||||||
|
opt.pcsc_driver = NULL; /* We can't use libpcsclite due to license
|
||||||
|
conflicts. */
|
||||||
|
|
||||||
|
|
||||||
shell = getenv ("SHELL");
|
shell = getenv ("SHELL");
|
||||||
if (shell && strlen (shell) >= 3 && !strcmp (shell+strlen (shell)-3, "csh") )
|
if (shell && strlen (shell) >= 3 && !strcmp (shell+strlen (shell)-3, "csh") )
|
||||||
csh_style = 1;
|
csh_style = 1;
|
||||||
@ -379,6 +386,7 @@ main (int argc, char **argv )
|
|||||||
|
|
||||||
case oReaderPort: app_set_default_reader_port (pargs.r.ret_str); break;
|
case oReaderPort: app_set_default_reader_port (pargs.r.ret_str); break;
|
||||||
case octapiDriver: opt.ctapi_driver = pargs.r.ret_str; break;
|
case octapiDriver: opt.ctapi_driver = pargs.r.ret_str; break;
|
||||||
|
case opcscDriver: opt.pcsc_driver = pargs.r.ret_str; break;
|
||||||
case oDisableOpenSC: opt.disable_opensc = 1; break;
|
case oDisableOpenSC: opt.disable_opensc = 1; break;
|
||||||
|
|
||||||
default : pargs.err = configfp? 1:2; break;
|
default : pargs.err = configfp? 1:2; break;
|
||||||
|
@ -54,6 +54,7 @@ struct {
|
|||||||
int batch; /* batch mode */
|
int batch; /* batch mode */
|
||||||
const char *homedir; /* configuration directory name */
|
const char *homedir; /* configuration directory name */
|
||||||
const char *ctapi_driver; /* Library to access the ctAPI. */
|
const char *ctapi_driver; /* Library to access the ctAPI. */
|
||||||
|
const char *pcsc_driver; /* Library to access the PC/SC system. */
|
||||||
int disable_opensc; /* Disable the sue of the OpenSC framework. */
|
int disable_opensc; /* Disable the sue of the OpenSC framework. */
|
||||||
} opt;
|
} opt;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user