From e93bd3983ca135f63dc8860febca3ee7f702853a Mon Sep 17 00:00:00 2001 From: Vincent JARDIN Date: Mon, 26 Apr 2021 17:38:44 +0000 Subject: [PATCH] IASECC/Gemalto: add support Add support for Gemalto's IAS ECC Dual ID One Cosmo using samples from: http://cartesapuce-discount.com/fr/cartes-a-puce-ias-ecc/146-cartes-a-puce-protiva-ias-ecc-tpc.html Some suppots were already available (ATR, init, etc.), but the select_file was missing the proper cases. --- src/libopensc/card-iasecc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libopensc/card-iasecc.c b/src/libopensc/card-iasecc.c index 9e91fe77..8682e143 100644 --- a/src/libopensc/card-iasecc.c +++ b/src/libopensc/card-iasecc.c @@ -920,6 +920,7 @@ iasecc_select_file(struct sc_card *card, const struct sc_path *path, sc_print_cache(card); if ((!iasecc_is_cpx(card)) && + (card->type != SC_CARD_TYPE_IASECC_GEMALTO) && (path->type != SC_PATH_TYPE_DF_NAME && lpath.len >= 2 && lpath.value[0] == 0x3F && lpath.value[1] == 0x00)) { @@ -1017,6 +1018,7 @@ iasecc_select_file(struct sc_card *card, const struct sc_path *path, card->type == SC_CARD_TYPE_IASECC_AMOS || card->type == SC_CARD_TYPE_IASECC_MI || card->type == SC_CARD_TYPE_IASECC_MI2 || + card->type == SC_CARD_TYPE_IASECC_GEMALTO || iasecc_is_cpx(card) ) { apdu.p2 = 0x04; @@ -1028,6 +1030,7 @@ iasecc_select_file(struct sc_card *card, const struct sc_path *path, card->type == SC_CARD_TYPE_IASECC_AMOS || card->type == SC_CARD_TYPE_IASECC_MI || card->type == SC_CARD_TYPE_IASECC_MI2 || + card->type == SC_CARD_TYPE_IASECC_GEMALTO || iasecc_is_cpx(card)) { apdu.p2 = 0x04; } @@ -1042,6 +1045,7 @@ iasecc_select_file(struct sc_card *card, const struct sc_path *path, if (card->type == SC_CARD_TYPE_IASECC_AMOS || card->type == SC_CARD_TYPE_IASECC_MI2 || card->type == SC_CARD_TYPE_IASECC_OBERTHUR || + card->type == SC_CARD_TYPE_IASECC_GEMALTO || iasecc_is_cpx(card)) { apdu.p2 = 0x04; }