- Stop using unflexible automake conditionals when
building PC/SC, OpenCT or USBToken support, use ifdef's directly in source. - Because of above, add HAVE_PCSCLITE for winconfig.h - Remove unnecessary includes for log.h, opensc.h and errors.h in libopensc sources, they're already taken care by internal.h. git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1406 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
087b9c1077
commit
5616dba08e
|
@ -39,6 +39,7 @@
|
|||
#define HAVE_GETOPT_H
|
||||
#define HAVE_IO_H
|
||||
#define HAVE_GETPASS
|
||||
#define HAVE_PCSCLITE
|
||||
|
||||
/* %windir% is replaced by the path of the Windows directory,
|
||||
* this is C:\WINNT or C:\WINDOWS on most systems.
|
||||
|
|
|
@ -4,19 +4,7 @@ includedir = @includedir@/opensc
|
|||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
EXTRA_DIST = Makefile.mak libopensc.pc.in \
|
||||
reader-pcsc.c reader-openct.c reader-usbtoken.c emv.c
|
||||
|
||||
if HAVE_PCSCLITE
|
||||
PCSC_SRC = reader-pcsc.c
|
||||
endif
|
||||
if HAVE_OPENCT
|
||||
OPENCT_SRC = reader-openct.c
|
||||
endif
|
||||
if HAVE_USBTOKEN
|
||||
USBTOKEN_SRC = reader-usbtoken.c
|
||||
endif
|
||||
READER_SRC = $(PCSC_SRC) $(OPENCT_SRC) $(USBTOKEN_SRC)
|
||||
EXTRA_DIST = Makefile.mak libopensc.pc.in
|
||||
|
||||
INCLUDES = @CPPFLAGS@ @OPENCT_CFLAGS@ @CFLAGS_PCSC@
|
||||
LDFLAGS = @LDFLAGS@ @OPENCT_LDFLAGS@
|
||||
|
@ -27,10 +15,16 @@ lib_LTLIBRARIES = libopensc.la
|
|||
libopensc_la_SOURCES = \
|
||||
sc.c ctx.c log.c errors.c portability.c module.c \
|
||||
asn1.c base64.c sec.c card.c iso7816.c dir.c padding.c \
|
||||
\
|
||||
pkcs15.c pkcs15-cert.c pkcs15-data.c pkcs15-pin.c \
|
||||
pkcs15-prkey.c pkcs15-pubkey.c pkcs15-sec.c \
|
||||
pkcs15-wrap.c pkcs15-algo.c pkcs15-cache.c \
|
||||
ctbcs.c reader-ctapi.c $(READER_SRC) \
|
||||
\
|
||||
emv.c \
|
||||
\
|
||||
ctbcs.c reader-ctapi.c reader-pcsc.c \
|
||||
reader-openct.c reader-usbtoken.c \
|
||||
\
|
||||
card-setcos.c card-miocos.c card-flex.c card-gpk.c \
|
||||
card-etoken.c card-tcos.c card-emv.c card-default.c \
|
||||
card-mcrd.c card-starcos.c
|
||||
|
|
|
@ -9,17 +9,21 @@ HEADERS = opensc.h pkcs15.h emv.h \
|
|||
|
||||
HEADERSDIR = $(TOPDIR)\src\include\opensc
|
||||
|
||||
OBJECTS = sc.obj ctx.obj module.obj asn1.obj log.obj base64.obj padding.obj \
|
||||
errors.obj sec.obj card.obj iso7816.obj dir.obj \
|
||||
portability.obj \
|
||||
OBJECTS = \
|
||||
sc.obj ctx.obj log.obj errors.obj portability.obj module.obj \
|
||||
asn1.obj base64.obj sec.obj card.obj iso7816.obj dir.obj padding.obj \
|
||||
\
|
||||
pkcs15.obj pkcs15-cert.obj pkcs15-data.obj pkcs15-pin.obj \
|
||||
pkcs15-prkey.obj pkcs15-pubkey.obj pkcs15-sec.obj \
|
||||
pkcs15-wrap.obj pkcs15-algo.obj \
|
||||
pkcs15-cache.obj reader-pcsc.obj \
|
||||
card-setcos.obj card-miocos.obj card-flex.obj \
|
||||
card-gpk.obj card-etoken.obj card-tcos.obj \
|
||||
card-mcrd.obj card-emv.obj card-default.obj ctbcs.obj \
|
||||
card-starcos.obj
|
||||
pkcs15-wrap.obj pkcs15-algo.obj pkcs15-cache.obj \
|
||||
\
|
||||
emv.obj \
|
||||
\
|
||||
ctbcs.obj reader-ctapi.obj reader-pcsc.obj \
|
||||
\
|
||||
card-setcos.obj card-miocos.obj card-flex.obj card-gpk.obj \
|
||||
card-etoken.obj card-tcos.obj card-emv.obj card-default.obj \
|
||||
card-mcrd.obj card-starcos.obj
|
||||
|
||||
all: install-headers $(TARGET)
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
#include "internal.h"
|
||||
#include "asn1.h"
|
||||
#include "log.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include "log.h"
|
||||
|
||||
static struct sc_card_operations default_ops;
|
||||
static struct sc_card_driver default_drv = {
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include "log.h"
|
||||
#include <string.h>
|
||||
|
||||
static struct sc_card_operations emv_ops;
|
||||
|
|
|
@ -21,10 +21,7 @@
|
|||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include "errors.h"
|
||||
#include "opensc.h"
|
||||
#include "cardctl.h"
|
||||
#include "log.h"
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include "log.h"
|
||||
#include "cardctl.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
|
|
@ -19,10 +19,8 @@
|
|||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include "log.h"
|
||||
#include "cardctl.h"
|
||||
#include "pkcs15.h"
|
||||
|
||||
#ifdef HAVE_OPENSSL
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
|
|
@ -19,10 +19,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "internal.h"
|
||||
#include "log.h"
|
||||
#include "asn1.h"
|
||||
#include "cardctl.h"
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include "log.h"
|
||||
#include "asn1.h"
|
||||
#include "cardctl.h"
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include "log.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
@ -18,14 +18,11 @@
|
|||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "internal.h"
|
||||
#include "asn1.h"
|
||||
#include "log.h"
|
||||
#include "cardctl.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/* TODO: - secure messaging
|
||||
* - Starcos ACs <-> OpenSC ACs
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include "log.h"
|
||||
#include "asn1.h"
|
||||
#include "cardctl.h"
|
||||
#include <string.h>
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include "log.h"
|
||||
#include "asn1.h"
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include "log.h"
|
||||
#include "ctbcs.h"
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include "log.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -70,7 +69,7 @@ static const struct _sc_driver_entry internal_card_drivers[] = {
|
|||
};
|
||||
|
||||
static const struct _sc_driver_entry internal_reader_drivers[] = {
|
||||
#if defined(HAVE_PCSCLITE) || defined(_WIN32)
|
||||
#if defined(HAVE_PCSCLITE)
|
||||
{ "pcsc", (void *) sc_get_pcsc_driver, NULL },
|
||||
#endif
|
||||
#ifndef _WIN32
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include "log.h"
|
||||
#include "asn1.h"
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -30,6 +30,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#include "opensc.h"
|
||||
#include "log.h"
|
||||
#include <assert.h>
|
||||
|
||||
#define SC_FILE_MAGIC 0x14426950
|
||||
|
|
|
@ -20,8 +20,6 @@
|
|||
|
||||
#include "internal.h"
|
||||
#include "asn1.h"
|
||||
#include "log.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include "log.h"
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include "log.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
|
|
@ -19,14 +19,11 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "errors.h"
|
||||
#include "internal.h"
|
||||
#include "log.h"
|
||||
|
||||
/* TODO doxygen comments */
|
||||
|
||||
/*
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
#include "internal.h"
|
||||
#include "asn1.h"
|
||||
#include "log.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
#include "internal.h"
|
||||
#include "pkcs15.h"
|
||||
#include "log.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
#include "internal.h"
|
||||
#include "pkcs15.h"
|
||||
#include "log.h"
|
||||
#include "asn1.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
|
||||
#include "internal.h"
|
||||
#include "pkcs15.h"
|
||||
#include "log.h"
|
||||
#include "asn1.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include "internal.h"
|
||||
#include "pkcs15.h"
|
||||
#include "asn1.h"
|
||||
#include "log.h"
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include "internal.h"
|
||||
#include "pkcs15.h"
|
||||
#include "asn1.h"
|
||||
#include "log.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include "internal.h"
|
||||
#include "pkcs15.h"
|
||||
#include "asn1.h"
|
||||
#include "log.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
#include "internal.h"
|
||||
#include "pkcs15.h"
|
||||
#include "log.h"
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -18,10 +18,8 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "opensc.h"
|
||||
#include "internal.h"
|
||||
#include "pkcs15.h"
|
||||
#include "log.h"
|
||||
#ifdef HAVE_OPENSSL
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/rand.h>
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include "internal.h"
|
||||
#include "pkcs15.h"
|
||||
#include "asn1.h"
|
||||
#include "log.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include "opensc.h"
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#ifndef _WIN32
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include "log.h"
|
||||
#include "ctbcs.h"
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
* Copyright (C) 2003 Olaf Kirch <okir@suse.de>
|
||||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#ifdef HAVE_OPENCT
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -12,16 +14,13 @@
|
|||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/un.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
|
||||
#endif
|
||||
#include <openct/openct.h>
|
||||
#include <openct/logging.h>
|
||||
#include <openct/error.h>
|
||||
|
||||
#include "opensc.h"
|
||||
#include "internal.h"
|
||||
#include "log.h"
|
||||
|
||||
/* If you set PREALLOCATE to a non-zero value, this backend
|
||||
* will allocate that many reader slots. This will allow hot-
|
||||
* plugging devices (such as USB tokens) while OpenSC is running.
|
||||
|
@ -445,3 +444,5 @@ openct_error(struct sc_reader *reader, int code)
|
|||
}
|
||||
return SC_ERROR_READER;
|
||||
}
|
||||
|
||||
#endif /* HAVE_OPENCT */
|
||||
|
|
|
@ -19,8 +19,7 @@
|
|||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include "log.h"
|
||||
#include "opensc.h"
|
||||
#ifdef HAVE_PCSCLITE
|
||||
#include "ctbcs.h"
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -608,3 +607,5 @@ const struct sc_reader_driver * sc_get_pcsc_driver()
|
|||
|
||||
return &pcsc_drv;
|
||||
}
|
||||
|
||||
#endif /* HAVE_PCSCLITE */
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
* Copyright (C) 2002 Andreas Jellinghaus <aj@dungeon.inka.de>
|
||||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#ifdef HAVE_USBTOKEN
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -13,11 +15,9 @@
|
|||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/un.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
|
||||
#include "opensc.h"
|
||||
#include "internal.h"
|
||||
#include "log.h"
|
||||
#endif
|
||||
|
||||
/* we will create that many usbtoken readers */
|
||||
#define READERS 5
|
||||
|
@ -350,3 +350,5 @@ int usbtoken_reader_unlock(struct sc_reader *reader,
|
|||
SC_FUNC_CALLED(reader->ctx, 4);
|
||||
return usbtoken_reader_unix_cmd(reader, slot, 5);
|
||||
}
|
||||
|
||||
#endif /* HAVE_USBTOKEN */
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include "log.h"
|
||||
#include "asn1.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
*/
|
||||
|
||||
#include "internal.h"
|
||||
#include "log.h"
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue