- made establishpacechannel output independant from any byte order conversion.
little endian handling is done by the ccid-part. - pacelib exports PACE-functionality. git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@223 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
@@ -1,27 +1,51 @@
|
||||
IFDNFC_LIB = libifdnfc.$(DYN_LIB_EXT)
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/src/pace -I$(top_builddir)/src/pace
|
||||
|
||||
ccid_emulator_SOURCES = ccid.c usbstring.c usb.c binutil.c scutil.c
|
||||
ccid_emulator_LDADD = $(OPENSC_LIBS) $(PTHREAD_LIBS)
|
||||
ccid_emulator_CFLAGS = $(OPENSC_CFLAGS) $(PTHREAD_CFLAGS)
|
||||
libpace_la_SOURCES = sm.c scutil.c pace.c pace_lib.c
|
||||
libpace_la_LIBADD = $(OPENSC_LIBS) $(OPENSSL_LIBS)
|
||||
libpace_la_CFLAGS = $(OPENSC_CFLAGS) $(OPENSSL_CFLAGS)
|
||||
|
||||
ccid_emulator_SOURCES = ccid.c usbstring.c usb.c binutil.c
|
||||
ccid_emulator_LDADD = $(OPENSC_LIBS) $(OPENSSL_LIBS) $(PTHREAD_LIBS)
|
||||
ccid_emulator_CFLAGS = $(OPENSC_CFLAGS) $(OPENSSL_CFLAGS) $(PTHREAD_CFLAGS)
|
||||
|
||||
ccid_test_SOURCES = ccid-test.c
|
||||
ccid_test_LDADD = $(PCSC_LIBS)
|
||||
ccid_test_CFLAGS = $(PCSC_CFLAGS)
|
||||
|
||||
pace_tool_SOURCES = sm.c pace-tool.c binutil.c scutil.c pace.c pace_lib.c
|
||||
pace_tool_LDADD = $(OPENSC_LIBS) $(OPENSSL_LIBS)
|
||||
pace_tool_SOURCES = pace-tool.c binutil.c
|
||||
pace_tool_LDADD = $(OPENSC_LIBS) $(OPENSSL_LIBS) libpace.la
|
||||
pace_tool_CFLAGS = $(OPENSC_CFLAGS) $(OPENSSL_CFLAGS)
|
||||
|
||||
bin_PROGRAMS =
|
||||
|
||||
noinst_HEADERS = \
|
||||
binutil.h \
|
||||
ccid.h \
|
||||
usbstring.h
|
||||
|
||||
if WITH_CCID
|
||||
bin_PROGRAMS += ccid-emulator ccid-test
|
||||
endif
|
||||
|
||||
|
||||
if WITH_PACE
|
||||
bin_PROGRAMS += pace-tool
|
||||
ccid_emulator_LDADD += libpace.la
|
||||
|
||||
ccid_emulator_SOURCES += sm.c pace.c pace_lib.c
|
||||
ccid_emulator_LDADD += $(OPENSSL_LIBS)
|
||||
ccid_emulator_CFLAGS += $(OPENSSL_CFLAGS)
|
||||
lib_LTLIBRARIES = libpace.la
|
||||
|
||||
nobase_include_HEADERS = \
|
||||
pace/sm.h \
|
||||
pace/pace.h \
|
||||
pace/scutil.h \
|
||||
pace/pace_lib.h
|
||||
|
||||
else
|
||||
ccid_emulator_SOURCES += scutil.c sm.c
|
||||
|
||||
noinst_HEADERS += \
|
||||
pace/sm.h \
|
||||
pace/pace.h \
|
||||
pace/scutil.h \
|
||||
pace/pace_lib.h
|
||||
endif
|
||||
|
||||
noinst_HEADERS = binutil.h ccid.h pace.h pace_lib.h scutil.h sm.h usbstring.h
|
||||
|
||||
@@ -27,14 +27,17 @@
|
||||
#include <opensc/log.h>
|
||||
|
||||
#include "ccid.h"
|
||||
#include "sm.h"
|
||||
#include "scutil.h"
|
||||
#include "config.h"
|
||||
|
||||
#ifdef WITH_PACE
|
||||
#include "pace.h"
|
||||
#include <pace/pace.h>
|
||||
#include <pace/sm.h>
|
||||
#include <pace/scutil.h>
|
||||
|
||||
struct sm_ctx sctx;
|
||||
static struct sm_ctx sctx;
|
||||
|
||||
#else
|
||||
#include "pace/scutil.h"
|
||||
#endif
|
||||
|
||||
static sc_context_t *ctx = NULL;
|
||||
@@ -178,7 +181,11 @@ static int get_rapdu(sc_apdu_t *apdu, size_t slot, __u8 **buf, size_t *resplen)
|
||||
}
|
||||
*buf = apdu->resp;
|
||||
|
||||
#ifdef WITH_PACE
|
||||
sc_result = sm_transmit_apdu(&sctx, card_in_slot[slot], apdu);
|
||||
#else
|
||||
sc_result = sc_transmit_apdu(&sctx, card_in_slot[slot], apdu);
|
||||
#endif
|
||||
if (sc_result < 0) {
|
||||
goto err;
|
||||
}
|
||||
@@ -1069,7 +1076,7 @@ perform_PC_to_RDR_Secure(const __u8 *in, size_t inlen, __u8** out, size_t *outle
|
||||
uint8_t encoding = bmFormatString & 2;
|
||||
uint8_t blocksize = bmPINBlockString & 0xf;
|
||||
|
||||
sc_debug(ctx, "PIN %s block (%d bytes) proberties:\n"
|
||||
sc_debug(ctx, "PIN %s block (%d bytes) proberties:\n"
|
||||
"\tminimum %d, maximum %d PIN digits\n"
|
||||
"\t%s PIN encoding, %s justification\n"
|
||||
"\tsystem units are %s\n"
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
#ifndef _CCID_PACE_H
|
||||
#define _CCID_PACE_H
|
||||
|
||||
#include "pace_lib.h"
|
||||
#include "sm.h"
|
||||
#include <pace/pace_lib.h>
|
||||
#include <pace/sm.h>
|
||||
#include <opensc/opensc.h>
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/pace.h>
|
||||
Reference in New Issue
Block a user