fixed selection of muscle applet for some JCREs

Previously, partial DF name selection was used, which is not mandatory
to implement for a JCRE. We now use the full DF name which must always
be implemented.

Note that the MUSCLE applet is deprecated and should not be used.

fixes #135
This commit is contained in:
Frank Morgner 2014-12-12 22:30:21 +01:00
parent c2d33fd72e
commit 4d5997dfba
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ static int muscle_match_card(sc_card_t *card)
* however it's not always properly nulled out... */
card->ops->logout = NULL;
if (msc_select_applet(card, muscleAppletId, 5) == 1) {
if (msc_select_applet(card, muscleAppletId, sizeof muscleAppletId) == 1) {
/* Muscle applet is present, check the protocol version to be sure */
sc_format_apdu(card, &apdu, SC_APDU_CASE_2, 0x3C, 0x00, 0x00);
apdu.cla = 0xB0;