> From: "Gambin Dejan" <[EMAIL PROTECTED]>
> Date: August 8, 2006 4:32:40 AM EDT
> To: "MUSCLE" <[email protected]>
> Subject: [Muscle] Muscle card support for OpenSC
> Reply-To: MUSCLE <[email protected]>
>
> Hi,
>
> I am trying to use my JavaCard with OpenSC using the OpenSC patch
> that supports Muscle cards. I am having a JCOP41 card. I have
> successfully built MuscleCard applet on my Windows machine (the
> newest development version), and formatted the card using
> MuscleTools (also the newest versions of MuscleTools, libMuscleCard
> and MCardPlugin). I have created
> pins too using MuscleTools...
>
> After that I have successfully built OpenSC 0.11.1 with Muscle
> patch, and I have also implemented the suggested modifications from
> Stef Hoeben. Then I have modified opensc.conf to force using muscle
> driver. But:
>
> 1. almost every command in opensc-explorer gives me "Class not
> supported" error in opensc_errors.log
The version of the MuscleCard applet might be different than the one I
developed the OpenSC support for. Its quite possible that the newer
applet has the class bytes changed on it. The applet Dave sent should
work with the existing opensc patch...
Since it seems the class bytes are the issue... I have attached a patch
that will enable the autodetection of the class bytes that the
'default' card module implementation uses.
--
Thomas Harning
@ Identity Alliance
Index: src/libopensc/card-muscle.c
===================================================================
--- src/libopensc/card-muscle.c (revision 668)
+++ src/libopensc/card-muscle.c (working copy)
@@ -423,6 +423,10 @@
int r = 0;
muscle_private_t *priv;
+ /* To autodetect class without changing visibility in card-default.c */
+ r = sc_get_default_driver()->ops->init(card);
+ if(r) return r;
+
card->name = "Muscle Card";
card->drv_data = malloc(sizeof(muscle_private_t));
if(!card->drv_data) {
@@ -438,12 +442,8 @@
}
priv->fs->udata = card;
priv->fs->listFile = _listFile;
- //r = autodetect_class(card);
- card->cla = 0xB0;
- if (r) {
- sc_error(card->ctx, "unable to determine the right class byte\n");
- return SC_ERROR_INVALID_CARD;
- }
+ //card->cla = 0xB0;
+
card->flags |= SC_CARD_FLAG_ONBOARD_KEY_GEN;
card->flags |= SC_CARD_FLAG_RNG;
card->caps |= SC_CARD_CAP_RNG;
_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle