Karsten,

you might consider including the following code modification (note last line), in the musclecardApplet.c plugin. If the length of the default applet AID is 0, for the AID one looks up in the service.plist having determined the coldreset ATR, then no further identification is required.



MSC_RV PL_MSCIdentifyToken( MSCLPTokenConnection pConnection ) {

 MSCLong32 rv;
 MSCTransmitBuffer transmitBuffer = { 0  };
 MSCPUChar8 apduResponse; MSCPUChar8 pBuffer;

 pBuffer = transmitBuffer.pBuffer;
 apduResponse = transmitBuffer.apduResponse;

 pBuffer[OFFSET_CLA]    = 0x00;
 pBuffer[OFFSET_INS]    = 0xA4;
 pBuffer[OFFSET_P1]     = 0x04;
 pBuffer[OFFSET_P2]     = 0x00;
if((pBuffer[OFFSET_LC] = (MSCUChar8)pConnection->tokenInfo.tokenAppLen) == 0 )
   return MSC_SUCCESS;


A Run created by the debug build:

200 ATR comparison: FILE: C:\Program Files\Muscle\Services\MCardPlugin.bundle\Contents\Info.plist
201 ATR comparison: Target Match: **
214 ATR comparison: Source: **
214 ATR comparison: Source: **
214 ATR comparison: Source: **
226 Match found at ATR alias *
249 Product name: *****
132 Value/Key not defined for: spDefaultApplication, indice: 0
324 No AID specified in bundle
408 Loading service library C:\Program Files\Muscle\Services\MCardPlugin.bundle\Contents\Win32\MCardPlugin
539 TPLoadToken returns Command successful.
611 MSCIdentifyToken returns Successful


_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to