Hi Chaskiel,

First, I want to mention that I was able to obtain some ATR value by adding 
additional debug information.  This is the content of 'atr' right after the 
memcpy() in eutron_card_reset().  It is 17 bytes.

  3b b7 18 00 c0 3e 31 fe 65 53 50 4b 32 34 90 00 25

The reset failure occurs later in the function.  Specifically, it times out in 
the second loop, because only 3 bytes come back instead of 4.  I changed the 
line "if (lr >= 4)" to read "if (lr >= 3)" as a hack, and now the openct 
reset completes, but I don't know if this does any good.

# openct-tool atr
Detected Eutron CryptoIdentity ITSEC-P/FIPS
Card present, status changed
ATR: 3b b7 18 00 c0 3e 31 fe 65 53 50 4b 32 34 90 00 25

(yes, I corrected the name)

# opensc-tool --atr
card.c:228:sc_transceive: Unable to transmit: Generic reader error
card.c:228:sc_transceive: Unable to transmit: Generic reader error
card.c:263:sc_transmit_apdu: transceive() failed: Generic reader error
iso7816.c:436:iso7816_select_file: APDU transmit failed: Generic reader error
card.c:763:sc_select_file: returning with: Generic reader error
card.c:263:sc_transmit_apdu: transceive() failed: Generic reader error
card-default.c:66:autodetect_class: APDU transmit failed: Generic reader error
card-default.c:113:default_init: unable to determine the right class byte
card.c:461:sc_connect_card: driver 'Default driver for unknown cards' init() 
failed: Card is invalid or cannot be handled
card.c:472:sc_connect_card: unable to find driver for inserted card
card.c:485:sc_connect_card: returning with: Card is invalid or cannot be 
handled
Failed to connect to card: Card is invalid or cannot be handled

Seems definitely broken still.

On Thursday 16 March 2006 17:01, Chaskiel M Grundman wrote:
> I would first attempt to remove the
> ifd_usb_control(dev, 0x41, 0xa3, 0, 0, NULL, 0, -1) != 0
>
>          || ifd_usb_control(dev, 0x41, 0xa1, 0, 0, NULL, 0, -1) != 0
>
> from eutron_card_reset. your usb log didn't include them.

Alright, I've done this now, though I'm not sure if it has an effect.  On the 
first attempt at initialization after this modification, the ATR ended up 
being 18 bytes (same ATR as before, but with a 0 byte prepended).  Further 
attempts show the normal 17 byte ATR.  I don't know if this is related to the 
modification yet, I'll have to try more times.  Maybe the serial stream was 
off-by-one as a fluke.

> First, a bit about  ifd_usb_control

Thanks for the explanations.

> safesign sent a different PTS sequence (I don't have time to decode it now.
> sorry)

Can you give me a line number in the log so I can try?  I'm still not sure how 
to read this thing.

Thanks,
-Justin
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to