implemented my own version of libpcsclite
Allows customizing of the default adress to which vpcd or libpcsclite connect to. My libpcsclite is currently not thread safe. It should not be installed together with PCSC-Lite since both packages have conflicting files. Use ./configure --enable-libpcsclite to use my version. Use ./configure --enable-vpcdhost=ADRESS to define connection mode and adress of vpicc.
This commit is contained in:
@@ -1,3 +1,22 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2013 Frank Morgner
|
||||
*
|
||||
* This file is part of virtualsmartcard.
|
||||
*
|
||||
* virtualsmartcard is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* virtualsmartcard is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* virtualsmartcard. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "ifd-vpcd.h"
|
||||
#include "vpcd.h"
|
||||
#include <debuglog.h>
|
||||
#include <errno.h>
|
||||
@@ -8,13 +27,12 @@
|
||||
|
||||
/* pcscd allows at most 16 readers. We will use 10.
|
||||
* See PCSCLITE_MAX_READERS_CONTEXTS in pcsclite.h */
|
||||
#define VICC_MAX_SLOTS \
|
||||
(PCSCLITE_MAX_READERS_CONTEXTS > 6 ? \
|
||||
PCSCLITE_MAX_READERS_CONTEXTS-6 : \
|
||||
1)
|
||||
const unsigned char VICC_MAX_SLOTS =
|
||||
PCSCLITE_MAX_READERS_CONTEXTS > 6 ?
|
||||
PCSCLITE_MAX_READERS_CONTEXTS-6 : 1;
|
||||
|
||||
static struct vicc_ctx *ctx[VICC_MAX_SLOTS];
|
||||
static char *hostname = NULL;
|
||||
const char *hostname = NULL;
|
||||
static const char openport[] = "/dev/null";
|
||||
|
||||
RESPONSECODE
|
||||
|
||||
Reference in New Issue
Block a user