[Muscle] Cyberflex e-gate 32k install error 6A80
Ludovic Rousseau
ludovic.rousseau at gmail.com
Thu May 28 00:43:59 PDT 2009
2009/5/27 Joao Pedro <countzero at sapo.pt>:
> Hello Sylvain,
>
>>>
>>> private void ComputeCrypt(APDU apdu, byte[] apduBuffer) {
>>> byte[] buffer = apduBuffer;
>>> +#ifdef WITH_EXT_APDU
>>> short dataOffset = apdu.getOffsetCdata();
>>> -#ifdef WITH_EXT_APDU
>>> short LC = apdu.getIncomingLength();
>>> short bytesLeft = apdu.setIncomingAndReceive();
>>
>> this is INVALID. according SUN specification, getIncomingLength
>> & getOffsetCdata can be used only AFTER a call to setIncomingAndReceive.
>>
>
> Ouch, my bad. I've just re-read the JC API and, indeed, the JVM should throw
> an APDUException.ILLEGAL_USE exception - the weird part is that I've been
> using the Muscle applet with the extended APDU patch for a couple of months
> now, with absolutely no issues. I use it to login on OS X, sign emails, use
> ssh, etc., on a daily basis...
>
> Nevertheless, I've attached a small patch that should fix this. I've
> re-compiled the applet with and without extended APDU support and used
> pkcs11-tool from the OpenSC project to test both versions. According to my
> tests both versions are working OK (see debug.ext_apdu.txt and debug.txt).
Patch applied in revision 287.
Thanks Joao
--
Dr. Ludovic Rousseau
More information about the Muscle
mailing list