philipWendland / IsoApplet

A Java Card PKI Applet aiming to be ISO 7816 compliant
GNU General Public License v3.0
165 stars 72 forks source link

Error on card initialization #8

Closed lamaral closed 8 years ago

lamaral commented 8 years ago

I installed the isoApplet on a J3A081 card using GlobalPlatform: gp -install IsoApplet.cap -default

Then when initializing the card with pkcs15-init --create-pkcs15 I get the following error: "Failed to create PKCS #15 meta structure: Transmit failed"

I'm sending the debug too.

2015-10-25 12:27:59.372 ===================================
2015-10-25 12:27:59.374 opensc version: 0.15.0g20150914124137
2015-10-25 12:27:59.377 PC/SC options: connect_exclusive=0 disconnect_action=1 transaction_end_action=0 reconnect_action=0 enable_pinpad=1 enable_pace=1
2015-10-25 12:27:59.380 [pkcs15-init] reader-pcsc.c:1061:pcsc_detect_readers: called
2015-10-25 12:27:59.382 Probing PC/SC readers
2015-10-25 12:27:59.385 Establish PC/SC context
2015-10-25 12:27:59.390 Found new PC/SC reader 'OMNIKEY CardMan 3x21 0'
2015-10-25 12:27:59.393 OMNIKEY CardMan 3x21 0 check
2015-10-25 12:27:59.395 current  state: 0x00190422
2015-10-25 12:27:59.398 previous state: 0x00000000
2015-10-25 12:27:59.400 card present, changed
2015-10-25 12:27:59.402 Requesting reader features ... 
2015-10-25 12:27:59.455 OMNIKEY CardMan 3x21 0:SCardConnect(SHARED): 0x00000000
2015-10-25 12:27:59.458 [pkcs15-init] reader-pcsc.c:933:detect_reader_features: called
2015-10-25 12:27:59.459 [pkcs15-init] reader-pcsc.c:1227:pcsc_detect_readers: returning with: 0 (Success)
2015-10-25 12:27:59.462 [pkcs15-init] sc.c:251:sc_detect_card_presence: called
2015-10-25 12:27:59.464 [pkcs15-init] reader-pcsc.c:378:pcsc_detect_card_presence: called
2015-10-25 12:27:59.466 OMNIKEY CardMan 3x21 0 check
2015-10-25 12:27:59.469 current  state: 0x00190022
2015-10-25 12:27:59.472 previous state: 0x00190422
2015-10-25 12:27:59.474 card present
2015-10-25 12:27:59.476 [pkcs15-init] reader-pcsc.c:383:pcsc_detect_card_presence: returning with: 1
2015-10-25 12:27:59.479 [pkcs15-init] sc.c:256:sc_detect_card_presence: returning with: 1
2015-10-25 12:27:59.481 [pkcs15-init] sc.c:251:sc_detect_card_presence: called
2015-10-25 12:27:59.484 [pkcs15-init] reader-pcsc.c:378:pcsc_detect_card_presence: called
2015-10-25 12:27:59.486 OMNIKEY CardMan 3x21 0 check
2015-10-25 12:27:59.489 [pkcs15-init] reader-pcsc.c:307:refresh_attributes: returning with: 0 (Success)
2015-10-25 12:27:59.492 [pkcs15-init] reader-pcsc.c:383:pcsc_detect_card_presence: returning with: 1
2015-10-25 12:27:59.494 [pkcs15-init] sc.c:256:sc_detect_card_presence: returning with: 1
2015-10-25 12:27:59.497 [pkcs15-init] card.c:196:sc_connect_card: called
2015-10-25 12:27:59.499 [pkcs15-init] reader-pcsc.c:458:pcsc_connect: called
2015-10-25 12:27:59.502 OMNIKEY CardMan 3x21 0 check
2015-10-25 12:27:59.505 [pkcs15-init] reader-pcsc.c:307:refresh_attributes: returning with: 0 (Success)
2015-10-25 12:27:59.507 Initial protocol: T=1
2015-10-25 12:27:59.509 ATR     : 3b:f8:18:00:00:81:31:fe:45:00:73:c8:40:00:00:90:00:80
2015-10-25 12:27:59.512 ATR try : 3B:DD:18:00:81:31:FE:45:80:F9:A0:00:00:00:77:01:00:70:0A:90:00:8B
2015-10-25 12:27:59.515 ignored - wrong length
2015-10-25 12:27:59.517 ATR     : 3b:f8:18:00:00:81:31:fe:45:00:73:c8:40:00:00:90:00:80
2015-10-25 12:27:59.520 ATR try : 3B:7F:96:00:00:00:31:B9:64:40:70:14:10:73:94:01:80:82:90:00
2015-10-25 12:27:59.522 ignored - wrong length
2015-10-25 12:27:59.524 ATR try : 3B:7F:96:00:00:00:31:B8:64:40:70:14:10:73:94:01:80:82:90:00
2015-10-25 12:27:59.527 ignored - wrong length
2015-10-25 12:27:59.530 ATR try : 3B:DF:18:FF:81:91:FE:1F:C3:00:31:B8:64:0C:01:EC:C1:73:94:01:80:82:90:00:B3
2015-10-25 12:27:59.532 ignored - wrong length
2015-10-25 12:27:59.534 ATR try : 3B:DC:18:FF:81:91:FE:1F:C3:80:73:C8:21:13:66:01:0B:03:52:00:05:38
2015-10-25 12:27:59.537 ignored - wrong length
2015-10-25 12:27:59.539 ATR     : 3b:f8:18:00:00:81:31:fe:45:00:73:c8:40:00:00:90:00:80
2015-10-25 12:27:59.542 ATR try : 3b:f8:18:00:00:81:31:fe:45:00:73:c8:40:00:00:90:00:80
2015-10-25 12:27:59.544 matching configured ATRs
2015-10-25 12:27:59.547 trying driver 'authentic'
2015-10-25 12:27:59.549 ATR     : 3b:f8:18:00:00:81:31:fe:45:00:73:c8:40:00:00:90:00:80
2015-10-25 12:27:59.551 ATR try : 3B:DD:18:00:81:31:FE:45:80:F9:A0:00:00:00:77:01:00:70:0A:90:00:8B
2015-10-25 12:27:59.553 ignored - wrong length
2015-10-25 12:27:59.555 trying driver 'iasecc'
2015-10-25 12:27:59.558 ATR     : 3b:f8:18:00:00:81:31:fe:45:00:73:c8:40:00:00:90:00:80
2015-10-25 12:27:59.560 ATR try : 3B:7F:96:00:00:00:31:B9:64:40:70:14:10:73:94:01:80:82:90:00
2015-10-25 12:27:59.563 ignored - wrong length
2015-10-25 12:27:59.565 ATR try : 3B:7F:96:00:00:00:31:B8:64:40:70:14:10:73:94:01:80:82:90:00
2015-10-25 12:27:59.568 ignored - wrong length
2015-10-25 12:27:59.571 ATR try : 3B:DF:18:FF:81:91:FE:1F:C3:00:31:B8:64:0C:01:EC:C1:73:94:01:80:82:90:00:B3
2015-10-25 12:27:59.573 ignored - wrong length
2015-10-25 12:27:59.576 ATR try : 3B:DC:18:FF:81:91:FE:1F:C3:80:73:C8:21:13:66:01:0B:03:52:00:05:38
2015-10-25 12:27:59.578 ignored - wrong length
2015-10-25 12:27:59.581 trying driver 'isoApplet'
2015-10-25 12:27:59.583 ATR     : 3b:f8:18:00:00:81:31:fe:45:00:73:c8:40:00:00:90:00:80
2015-10-25 12:27:59.585 ATR try : 3b:f8:18:00:00:81:31:fe:45:00:73:c8:40:00:00:90:00:80
2015-10-25 12:27:59.588 matched driver 'Javacard with IsoApplet'
2015-10-25 12:27:59.591 [pkcs15-init] card-isoApplet.c:114:isoApplet_select_applet: called
2015-10-25 12:27:59.593 [pkcs15-init] apdu.c:563:sc_transmit_apdu: called
2015-10-25 12:27:59.596 [pkcs15-init] card.c:394:sc_lock: called
2015-10-25 12:27:59.598 [pkcs15-init] reader-pcsc.c:526:pcsc_lock: called
2015-10-25 12:27:59.600 [pkcs15-init] apdu.c:530:sc_transmit: called
2015-10-25 12:27:59.603 [pkcs15-init] apdu.c:384:sc_single_transmit: called
2015-10-25 12:27:59.606 CLA:0, INS:A4, P1:4, P2:0, data(12) 5664112C
2015-10-25 12:27:59.608 reader 'OMNIKEY CardMan 3x21 0'
2015-10-25 12:27:59.611 
Outgoing APDU data [   17 bytes] =====================================
00 A4 04 00 0C F2 76 A2 88 BC FB A6 9D 34 F3 10 ......v......4..
01                                              .
======================================================================
2015-10-25 12:27:59.613 [pkcs15-init] reader-pcsc.c:184:pcsc_internal_transmit: called
2015-10-25 12:27:59.640 
Incoming APDU data [    5 bytes] =====================================
00 05 00 90 00 .....
======================================================================
2015-10-25 12:27:59.643 [pkcs15-init] apdu.c:399:sc_single_transmit: returning with: 0 (Success)
2015-10-25 12:27:59.645 [pkcs15-init] apdu.c:552:sc_transmit: returning with: 0 (Success)
2015-10-25 12:27:59.647 [pkcs15-init] card.c:434:sc_unlock: called
2015-10-25 12:27:59.650 [pkcs15-init] reader-pcsc.c:566:pcsc_unlock: called
2015-10-25 12:27:59.652 [pkcs15-init] card-isoApplet.c:134:isoApplet_select_applet: returning with: 0 (Success)
2015-10-25 12:27:59.655 IsoApplet: Mismatching minor API version. Proceeding anyway. API versions: Driver (00-06), applet (00-05). Please update accordingly whenever possible.
2015-10-25 12:27:59.657 [pkcs15-init] card-isoApplet.c:204:isoApplet_init: called
2015-10-25 12:27:59.660 [pkcs15-init] card-isoApplet.c:114:isoApplet_select_applet: called
2015-10-25 12:27:59.663 [pkcs15-init] apdu.c:563:sc_transmit_apdu: called
2015-10-25 12:27:59.665 [pkcs15-init] card.c:394:sc_lock: called
2015-10-25 12:27:59.668 [pkcs15-init] reader-pcsc.c:526:pcsc_lock: called
2015-10-25 12:27:59.671 [pkcs15-init] apdu.c:530:sc_transmit: called
2015-10-25 12:27:59.673 [pkcs15-init] apdu.c:384:sc_single_transmit: called
2015-10-25 12:27:59.676 CLA:0, INS:A4, P1:4, P2:0, data(12) 5664112C
2015-10-25 12:27:59.678 reader 'OMNIKEY CardMan 3x21 0'
2015-10-25 12:27:59.681 
Outgoing APDU data [   17 bytes] =====================================
00 A4 04 00 0C F2 76 A2 88 BC FB A6 9D 34 F3 10 ......v......4..
01                                              .
======================================================================
2015-10-25 12:27:59.683 [pkcs15-init] reader-pcsc.c:184:pcsc_internal_transmit: called
2015-10-25 12:27:59.694 
Incoming APDU data [    5 bytes] =====================================
00 05 00 90 00 .....
======================================================================
2015-10-25 12:27:59.696 [pkcs15-init] apdu.c:399:sc_single_transmit: returning with: 0 (Success)
2015-10-25 12:27:59.699 [pkcs15-init] apdu.c:552:sc_transmit: returning with: 0 (Success)
2015-10-25 12:27:59.702 [pkcs15-init] card.c:434:sc_unlock: called
2015-10-25 12:27:59.704 [pkcs15-init] reader-pcsc.c:566:pcsc_unlock: called
2015-10-25 12:27:59.707 [pkcs15-init] card-isoApplet.c:134:isoApplet_select_applet: returning with: 0 (Success)
2015-10-25 12:27:59.710 [pkcs15-init] card-isoApplet.c:259:isoApplet_init: returning with: 0 (Success)
2015-10-25 12:27:59.713 card info name:'isoApplet', type:-1, flags:0x0, max_send/recv_size:255/256
2015-10-25 12:27:59.715 [pkcs15-init] card.c:1332:sc_card_sm_check: called
2015-10-25 12:27:59.718 card->sm_ctx.ops.open 00000000
2015-10-25 12:27:59.720 ATR     : 3b:f8:18:00:00:81:31:fe:45:00:73:c8:40:00:00:90:00:80
2015-10-25 12:27:59.723 ATR try : 3b:f8:18:00:00:81:31:fe:45:00:73:c8:40:00:00:90:00:80
2015-10-25 12:27:59.726 [pkcs15-init] card.c:1341:sc_card_sm_check: returning with: 0 (Success)
2015-10-25 12:27:59.728 [pkcs15-init] card.c:319:sc_connect_card: returning with: 0 (Success)
2015-10-25 12:27:59.731 [pkcs15-init] card.c:394:sc_lock: called
2015-10-25 12:27:59.733 [pkcs15-init] reader-pcsc.c:526:pcsc_lock: called
2015-10-25 12:27:59.737 [pkcs15-init] pkcs15-lib.c:300:sc_pkcs15init_bind: called
2015-10-25 12:27:59.738 [pkcs15-init] card.c:843:sc_card_ctl: called
2015-10-25 12:27:59.741 [pkcs15-init] card-isoApplet.c:1046:isoApplet_card_ctl: called
2015-10-25 12:27:59.743 [pkcs15-init] card-isoApplet.c:1060:isoApplet_card_ctl: returning with: -1408 (Not supported)
2015-10-25 12:27:59.746 card_ctl(4) not supported
2015-10-25 12:27:59.749 called; type=2, path=3f0050154946
2015-10-25 12:27:59.751 [pkcs15-init] apdu.c:563:sc_transmit_apdu: called
2015-10-25 12:27:59.754 [pkcs15-init] card.c:394:sc_lock: called
2015-10-25 12:27:59.757 [pkcs15-init] apdu.c:530:sc_transmit: called
2015-10-25 12:27:59.759 [pkcs15-init] apdu.c:384:sc_single_transmit: called
2015-10-25 12:27:59.762 CLA:0, INS:A4, P1:8, P2:0, data(4) 00D8F80E
2015-10-25 12:27:59.765 reader 'OMNIKEY CardMan 3x21 0'
2015-10-25 12:27:59.768 
Outgoing APDU data [   10 bytes] =====================================
00 A4 08 00 04 50 15 49 46 00 .....P.IF.
======================================================================
2015-10-25 12:27:59.770 [pkcs15-init] reader-pcsc.c:184:pcsc_internal_transmit: called
2015-10-25 12:27:59.782 
Incoming APDU data [    2 bytes] =====================================
6A 82 j.
======================================================================
2015-10-25 12:27:59.784 [pkcs15-init] apdu.c:399:sc_single_transmit: returning with: 0 (Success)
2015-10-25 12:27:59.787 [pkcs15-init] apdu.c:552:sc_transmit: returning with: 0 (Success)
2015-10-25 12:27:59.789 [pkcs15-init] card.c:434:sc_unlock: called
2015-10-25 12:27:59.792 File not found
2015-10-25 12:27:59.795 [pkcs15-init] iso7816.c:553:iso7816_select_file: returning with: -1201 (File not found)
2015-10-25 12:27:59.797 [pkcs15-init] card.c:714:sc_select_file: 'SELECT' error: -1201 (File not found)
2015-10-25 12:27:59.800 [pkcs15-init] profile.c:338:sc_profile_load: called
2015-10-25 12:27:59.803 Using profile directory 'C:\Program Files (x86)\OpenSC Project\OpenSC\profiles'.
2015-10-25 12:27:59.805 Trying profile file C:\Program Files (x86)\OpenSC Project\OpenSC\profiles\pkcs15.profile
2015-10-25 12:27:59.809 profile C:\Program Files (x86)\OpenSC Project\OpenSC\profiles\pkcs15.profile loaded ok
2015-10-25 12:27:59.812 [pkcs15-init] profile.c:395:sc_profile_load: returning with: 0 (Success)
2015-10-25 12:27:59.814 [pkcs15-init] profile.c:338:sc_profile_load: called
2015-10-25 12:27:59.817 Using profile directory 'C:\Program Files (x86)\OpenSC Project\OpenSC\profiles'.
2015-10-25 12:27:59.820 Trying profile file C:\Program Files (x86)\OpenSC Project\OpenSC\profiles\isoApplet.profile
2015-10-25 12:27:59.823 profile C:\Program Files (x86)\OpenSC Project\OpenSC\profiles\isoApplet.profile loaded ok
2015-10-25 12:27:59.826 [pkcs15-init] profile.c:395:sc_profile_load: returning with: 0 (Success)
2015-10-25 12:27:59.828 [pkcs15-init] profile.c:407:sc_profile_finish: called
2015-10-25 12:27:59.831 [pkcs15-init] profile.c:450:sc_profile_finish: returning with: 0 (Success)
2015-10-25 12:27:59.833 [pkcs15-init] pkcs15-lib.c:407:sc_pkcs15init_bind: returning with: 0 (Success)
2015-10-25 12:28:15.578 [pkcs15-init] pkcs15-lib.c:765:sc_pkcs15init_add_app: called
2015-10-25 12:28:15.581 [pkcs15-init] pkcs15-lib.c:3787:sc_pkcs15init_qualify_pin: called
2015-10-25 12:28:15.584 [pkcs15-init] pkcs15-lib.c:3802:sc_pkcs15init_qualify_pin: returning with: 0 (Success)
2015-10-25 12:28:15.587 [pkcs15-init] pkcs15-isoApplet.c:214:isoApplet_select_pin_reference: called
2015-10-25 12:28:15.589 [pkcs15-init] pkcs15-isoApplet.c:247:isoApplet_select_pin_reference: returning with: 0 (Success)
2015-10-25 12:28:15.592 [pkcs15-init] pkcs15-lib.c:3787:sc_pkcs15init_qualify_pin: called
2015-10-25 12:28:15.594 [pkcs15-init] pkcs15-lib.c:3802:sc_pkcs15init_qualify_pin: returning with: 0 (Success)
2015-10-25 12:28:15.597 Add virtual SO_PIN('User PIN',flags:21,reference:1,path:'')
2015-10-25 12:28:15.600 [pkcs15-init] pkcs15-isoApplet.c:187:isoApplet_create_dir: called
2015-10-25 12:28:15.602 [pkcs15-init] pkcs15-lib.c:3502:sc_pkcs15init_create_file: called
2015-10-25 12:28:15.605 create file '3f005015'
2015-10-25 12:28:15.608 [pkcs15-init] pkcs15-lib.c:3453:do_select_parent: called
2015-10-25 12:28:15.610 called; type=2, path=3f00
2015-10-25 12:28:15.613 [pkcs15-init] apdu.c:563:sc_transmit_apdu: called
2015-10-25 12:28:15.615 [pkcs15-init] card.c:394:sc_lock: called
2015-10-25 12:28:15.618 [pkcs15-init] apdu.c:530:sc_transmit: called
2015-10-25 12:28:15.620 [pkcs15-init] apdu.c:384:sc_single_transmit: called
2015-10-25 12:28:15.623 CLA:0, INS:A4, P1:0, P2:0, data(2) 00D8F118
2015-10-25 12:28:15.625 reader 'OMNIKEY CardMan 3x21 0'
2015-10-25 12:28:15.628 
Outgoing APDU data [    8 bytes] =====================================
00 A4 00 00 02 3F 00 00 .....?..
======================================================================
2015-10-25 12:28:15.630 [pkcs15-init] reader-pcsc.c:184:pcsc_internal_transmit: called
2015-10-25 12:28:15.634 OMNIKEY CardMan 3x21 0:SCardTransmit/Control failed: 0x80100068
2015-10-25 12:28:15.637 [pkcs15-init] reader-pcsc.c:378:pcsc_detect_card_presence: called
2015-10-25 12:28:15.640 OMNIKEY CardMan 3x21 0 check
2015-10-25 12:28:15.643 current  state: 0x00190122
2015-10-25 12:28:15.646 previous state: 0x00190022
2015-10-25 12:28:15.649 card present
2015-10-25 12:28:15.652 [pkcs15-init] reader-pcsc.c:383:pcsc_detect_card_presence: returning with: 5
2015-10-25 12:28:15.655 [pkcs15-init] reader-pcsc.c:378:pcsc_detect_card_presence: called
2015-10-25 12:28:15.657 OMNIKEY CardMan 3x21 0 check
2015-10-25 12:28:15.661 [pkcs15-init] reader-pcsc.c:307:refresh_attributes: returning with: 0 (Success)
2015-10-25 12:28:15.664 [pkcs15-init] reader-pcsc.c:383:pcsc_detect_card_presence: returning with: 5
2015-10-25 12:28:15.666 unable to transmit
2015-10-25 12:28:15.668 [pkcs15-init] apdu.c:397:sc_single_transmit: unable to transmit APDU: -1107 (Transmit failed)
2015-10-25 12:28:15.671 [pkcs15-init] apdu.c:533:sc_transmit: transmit APDU failed: -1107 (Transmit failed)
2015-10-25 12:28:15.674 [pkcs15-init] card.c:434:sc_unlock: called
2015-10-25 12:28:15.677 [pkcs15-init] iso7816.c:537:iso7816_select_file: APDU transmit failed: -1107 (Transmit failed)
2015-10-25 12:28:15.679 [pkcs15-init] card.c:714:sc_select_file: 'SELECT' error: -1107 (Transmit failed)
2015-10-25 12:28:15.682 [pkcs15-init] pkcs15-lib.c:3490:do_select_parent: returning with: -1107 (Transmit failed)
2015-10-25 12:28:15.685 [pkcs15-init] pkcs15-lib.c:3506:sc_pkcs15init_create_file: Cannot create file: select parent error: -1107 (Transmit failed)
2015-10-25 12:28:15.687 [pkcs15-init] pkcs15-isoApplet.c:194:isoApplet_create_dir: returning with: -1107 (Transmit failed)
2015-10-25 12:28:15.690 [pkcs15-init] pkcs15-lib.c:835:sc_pkcs15init_add_app: Create 'DIR' error: -1107 (Transmit failed)
2015-10-25 12:28:15.693 [pkcs15-init] pkcs15-lib.c:417:sc_pkcs15init_unbind: called
2015-10-25 12:28:15.696 Pksc15init Unbind: 0:00000000:1
2015-10-25 12:28:15.698 [pkcs15-init] card.c:434:sc_unlock: called
2015-10-25 12:28:15.701 [pkcs15-init] reader-pcsc.c:566:pcsc_unlock: called
2015-10-25 12:28:15.705 OMNIKEY CardMan 3x21 0:SCardEndTransaction failed: 0x80100068
2015-10-25 12:28:15.708 [pkcs15-init] card.c:336:sc_disconnect_card: called
2015-10-25 12:28:15.710 [pkcs15-init] card-isoApplet.c:142:isoApplet_finish: called
2015-10-25 12:28:15.712 [pkcs15-init] card-isoApplet.c:148:isoApplet_finish: returning with: 0 (Success)
2015-10-25 12:28:15.714 [pkcs15-init] reader-pcsc.c:512:pcsc_disconnect: called
2015-10-25 12:28:15.718 [pkcs15-init] card.c:357:sc_disconnect_card: returning with: 0 (Success)
2015-10-25 12:28:15.720 [pkcs15-init] ctx.c:815:sc_release_context: called
2015-10-25 12:28:15.723 [pkcs15-init] reader-pcsc.c:766:pcsc_finish: called
philipWendland commented 8 years ago
2015-10-25 12:28:15.630 [pkcs15-init] reader-pcsc.c:184:pcsc_internal_transmit: called
2015-10-25 12:28:15.634 OMNIKEY CardMan 3x21 0:SCardTransmit/Control failed: 0x80100068

Sounds like it takes 0.004s to fail. To me, it sounds more or less like an error from a lower layer.

We can try a few things: 1) Please make sure to use the latest version of pcsc-lite 2) Try a different card and/or reader if possible 3) Please start pcscd in foreground, enable debug output and post the results. See: http://ludovicrousseau.blogspot.de/2011/07/pcscd-debug-output.html

philipWendland commented 8 years ago

This issue was inactive for some time now. If you still have this issue, please re-open. Thanks.

lamaral commented 8 years ago

I found what was the problem. I have an Omnikey 3121 reader. I installed the drivers from Omnikey. After I removed the drivers, everything worked perfectly.

philipWendland commented 8 years ago

I think this is maybe still a reader issue:

Incoming APDU data [  254 bytes] =====================================
A8 0A 30 08 04 06 3F 00 50 15 44 01 00 00 00 00 ..0...?.P.D.....
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00       ..............
======================================================================

The SW1SW2 is not shown here. The card/reader should send 256 bytes, containing the SW1SW2.

pcscd has an option to log apdus (-a). Can you check wether the SW1SW2 can be seen here?

On 01/30/2016 07:30 PM, Luiz Fernando Ribeiro Amaral wrote:

Hello Philip,

I managed to initialize the card successfully. What happens now is that any operation that I try I get an |PKCS#15 binding failed: Unsupported card|.

I'm attaching the pkcs15-init debug output and the pcscd debug output. pcscd.txt https://github.com/philipWendland/IsoApplet/files/110930/pcscd.txt pkcs15-init.txt https://github.com/philipWendland/IsoApplet/files/110931/pkcs15-init.txt

— Reply to this email directly or view it on GitHub https://github.com/philipWendland/IsoApplet/issues/8#issuecomment-177268179.

lamaral commented 8 years ago

Philip,

It turned out was just the reader driver. After I removed the HID Omnikey drivers it worked fine.

philipWendland commented 8 years ago

OK, thanks. I did not see your latest response in the email conversation, sorry.