From ca382fd93bd7b2d073577dabdf6e9f420f0ac673 Mon Sep 17 00:00:00 2001 From: vtarasov Date: Sun, 9 Jan 2011 08:28:38 +0000 Subject: [PATCH] iso7816: accept 'FCP' tag when processing FCI git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5062 c6295689-39f2-0310-b995-f0e70906c6a9 --- src/libopensc/iso7816.c | 4 +++- src/libopensc/iso7816.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libopensc/iso7816.c b/src/libopensc/iso7816.c index 02a7e706..2001c7c1 100644 --- a/src/libopensc/iso7816.c +++ b/src/libopensc/iso7816.c @@ -27,6 +27,7 @@ #include "internal.h" #include "asn1.h" +#include "iso7816.h" static const struct sc_card_error iso7816_errors[] = { { 0x6200, SC_ERROR_MEMORY_FAILURE, "State of non-volatile memory unchanged" }, @@ -472,7 +473,8 @@ static int iso7816_select_file(sc_card_t *card, if (apdu.resplen < 2) SC_FUNC_RETURN(card->ctx, SC_LOG_DEBUG_VERBOSE, SC_ERROR_UNKNOWN_DATA_RECEIVED); switch (apdu.resp[0]) { - case 0x6F: + case ISO7816_TAG_FCI: + case ISO7816_TAG_FCP: file = sc_file_new(); if (file == NULL) SC_FUNC_RETURN(card->ctx, SC_LOG_DEBUG_NORMAL, SC_ERROR_OUT_OF_MEMORY); diff --git a/src/libopensc/iso7816.h b/src/libopensc/iso7816.h index d8730258..ee314133 100644 --- a/src/libopensc/iso7816.h +++ b/src/libopensc/iso7816.h @@ -9,6 +9,8 @@ extern "C" { #endif +#define ISO7816_TAG_FCI 0x6F + #define ISO7816_TAG_FCP 0x62 #define ISO7816_TAG_FCP_SIZE 0x80 #define ISO7816_TAG_FCP_TYPE 0x82