switched to opensc 0.12.1, where build_apdu has been accepted as sc_bytes2apdu
git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@433 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
@@ -85,13 +85,13 @@ if test "x$enable_pace" != xno ; then
|
||||
enable_pace=yes
|
||||
else
|
||||
PKG_CHECK_EXISTS([libopensc],
|
||||
[PKG_CHECK_MODULES([OPENSC], [libopensc >= 0.12])],
|
||||
[AC_MSG_WARN([libopensc >= 0.12 not found by pkg-config])])
|
||||
[PKG_CHECK_MODULES([OPENSC], [libopensc >= 0.12.1])],
|
||||
[AC_MSG_WARN([libopensc >= 0.12.1 not found by pkg-config])])
|
||||
test -z "$OPENSC_LIBS" && OPENSC_LIBS="-lopensc"
|
||||
LIBS="$LDFLAGS $OPENSC_LIBS $OPENSSL_LIBS"
|
||||
AC_MSG_CHECKING([for sc_ctx_get_reader_count])
|
||||
AC_TRY_LINK_FUNC(sc_ctx_get_reader_count, [ AC_MSG_RESULT([yes]) ],
|
||||
[ AC_MSG_ERROR([libopensc >= 0.12 not found, use ./configure OPENSC_LIBS=...]) ])
|
||||
AC_MSG_CHECKING([for sc_bytes2apdu])
|
||||
AC_TRY_LINK_FUNC(sc_bytes2apdu, [ AC_MSG_RESULT([yes]) ],
|
||||
[ AC_MSG_ERROR([libopensc >= 0.12.1 not found, use ./configure OPENSC_LIBS=...]) ])
|
||||
fi
|
||||
CPPFLAGS="$saved_CPPFLAGS"
|
||||
LIBS="$saved_LIBS"
|
||||
|
||||
@@ -408,7 +408,7 @@ perform_PC_to_RDR_IccPowerOn(const __u8 *in, size_t inlen, __u8 **out, size_t *o
|
||||
|
||||
if (sc_result >= 0) {
|
||||
return get_RDR_to_PC_SlotStatus(request->bSeq,
|
||||
sc_result, out, outlen, card->atr, card->atr_len);
|
||||
sc_result, out, outlen, card->atr.value, card->atr.len);
|
||||
} else {
|
||||
sc_debug(ctx, SC_LOG_DEBUG_VERBOSE, "Returning default status package.");
|
||||
return get_RDR_to_PC_SlotStatus(request->bSeq,
|
||||
@@ -544,7 +544,7 @@ perform_PC_to_RDR_XfrBlock(const u8 *in, size_t inlen, __u8** out, size_t *outle
|
||||
sc_result = perform_pseudo_apdu(abDataIn, apdulen, &abDataOut,
|
||||
&abDataOutLen);
|
||||
} else {
|
||||
sc_result = build_apdu(ctx, abDataIn, apdulen, &apdu);
|
||||
sc_result = sc_bytes2apdu(ctx, abDataIn, apdulen, &apdu);
|
||||
if (sc_result >= 0)
|
||||
sc_result = get_rapdu(&apdu, &abDataOut,
|
||||
&abDataOutLen);
|
||||
@@ -1217,7 +1217,7 @@ perform_PC_to_RDR_Secure(const __u8 *in, size_t inlen, __u8** out, size_t *outle
|
||||
sc_result = SC_ERROR_INVALID_DATA;
|
||||
goto err;
|
||||
}
|
||||
sc_result = build_apdu(ctx, abPINApdu, apdulen, &apdu);
|
||||
sc_result = sc_bytes2apdu(ctx, abPINApdu, apdulen, &apdu);
|
||||
if (sc_result < 0) {
|
||||
bin_log(ctx, SC_LOG_DEBUG_VERBOSE, "Invalid APDU", abPINApdu, apdulen);
|
||||
goto err;
|
||||
|
||||
Reference in New Issue
Block a user