From 8d0c7e9966e517417dd42bf3a2d87c264cdeb0bc Mon Sep 17 00:00:00 2001 From: Frank Morgner Date: Fri, 17 Dec 2021 00:03:04 +0100 Subject: [PATCH] fixed avoiding OpenSC's GET RESPONSE --- ccid/src/ccid.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ccid/src/ccid.c b/ccid/src/ccid.c index bab81cf..3f993da 100644 --- a/ccid/src/ccid.c +++ b/ccid/src/ccid.c @@ -641,14 +641,14 @@ perform_PC_to_RDR_XfrBlock(const u8 *in, size_t inlen, __u8** out, size_t *outle } sc_result = sc_bytes2apdu(ctx, abDataIn, apdulen, &apdu); - if (sc_result >= 0) + if (sc_result >= 0) { + /* don't magically get additional data in OpenSC */ + apdu.flags |= SC_APDU_FLAGS_NO_GET_RESP; sc_result = get_rapdu(&apdu, &abDataOut, &abDataOutLen); - else + } else bin_log(ctx, SC_LOG_DEBUG_VERBOSE, "Invalid APDU", abDataIn, __le32_to_cpu(request->dwLength)); - /* don't magically get additional data in OpenSC */ - apdu->flags |= SC_APDU_FLAGS_NO_GET_RESP; sc_result = get_RDR_to_PC_DataBlock(request->bSeq, sc_result, out, outlen, abDataOut, abDataOutLen);