Кирилл Мещеряков пишет:Поставьте, пожалуйста, в файле /etc/opensc.conf значение debug = 6 и запустите
$pkcs15-init --erase-card
Посмотрим, что он скажет.
Аналогичная проблема - Rutoken S (0a89:0020) 32K200Z.
Для работоспособности токена форматировал под windows утилитой rtCert, все ок. Но под линукс получается ошибка.
pkcs15-init --erase-card
biiont@bitheap ~ % pkcs15-init --erase-card
0xb724e6c0 14:11:07.546 [pkcs15-init] ctx.c:659:sc_context_create: ===================================
0xb724e6c0 14:11:07.546 [pkcs15-init] ctx.c:660:sc_context_create: opensc version: 0.12.2
0xb724e6c0 14:11:07.546 [pkcs15-init] reader-pcsc.c:657:pcsc_init: PC/SC options: connect_exclusive=0 disconnect_action=1 transaction_end_action=0 reconnect_action=0 enable_pinpad=1
0xb724e6c0 14:11:07.546 [pkcs15-init] reader-pcsc.c:870:pcsc_detect_readers: called
0xb724e6c0 14:11:07.546 [pkcs15-init] reader-pcsc.c:878:pcsc_detect_readers: Probing pcsc readers
0xb724e6c0 14:11:07.546 [pkcs15-init] reader-pcsc.c:900:pcsc_detect_readers: Establish pcsc context
0xb724e6c0 14:11:07.546 [pkcs15-init] reader-pcsc.c:948:pcsc_detect_readers: Found new pcsc reader 'Aktiv Rutoken S 00 00'
0xb724e6c0 14:11:07.547 [pkcs15-init] reader-pcsc.c:277:refresh_attributes: Aktiv Rutoken S 00 00 check
0xb724e6c0 14:11:07.947 [pkcs15-init] reader-pcsc.c:301:refresh_attributes: current state: 0x00000022
0xb724e6c0 14:11:07.947 [pkcs15-init] reader-pcsc.c:302:refresh_attributes: previous state: 0x00000000
0xb724e6c0 14:11:07.947 [pkcs15-init] reader-pcsc.c:356:refresh_attributes: card present, changed
0xb724e6c0 14:11:07.947 [pkcs15-init] reader-pcsc.c:979:pcsc_detect_readers: Requesting reader features ...
0xb724e6c0 14:11:07.947 [pkcs15-init] reader-pcsc.c:993:pcsc_detect_readers: Aktiv Rutoken S 00 00:SCardConnect(SHARED): 0x8010000f
0xb724e6c0 14:11:07.947 [pkcs15-init] reader-pcsc.c:1023:pcsc_detect_readers: returning with: 0 (Success)
0xb724e6c0 14:11:07.947 [pkcs15-init] sc.c:195:sc_detect_card_presence: called
0xb724e6c0 14:11:07.947 [pkcs15-init] reader-pcsc.c:364:pcsc_detect_card_presence: called
0xb724e6c0 14:11:07.947 [pkcs15-init] reader-pcsc.c:277:refresh_attributes: Aktiv Rutoken S 00 00 check
0xb724e6c0 14:11:08.347 [pkcs15-init] reader-pcsc.c:293:refresh_attributes: returning with: 0 (Success)
0xb724e6c0 14:11:08.347 [pkcs15-init] reader-pcsc.c:369:pcsc_detect_card_presence: returning with: 1
0xb724e6c0 14:11:08.347 [pkcs15-init] sc.c:200:sc_detect_card_presence: returning with: 1
Using reader with a card: Aktiv Rutoken S 00 00
0xb724e6c0 14:11:08.347 [pkcs15-init] sc.c:195:sc_detect_card_presence: called
0xb724e6c0 14:11:08.347 [pkcs15-init] reader-pcsc.c:364:pcsc_detect_card_presence: called
0xb724e6c0 14:11:08.347 [pkcs15-init] reader-pcsc.c:277:refresh_attributes: Aktiv Rutoken S 00 00 check
0xb724e6c0 14:11:08.748 [pkcs15-init] reader-pcsc.c:293:refresh_attributes: returning with: 0 (Success)
0xb724e6c0 14:11:08.748 [pkcs15-init] reader-pcsc.c:369:pcsc_detect_card_presence: returning with: 1
0xb724e6c0 14:11:08.748 [pkcs15-init] sc.c:200:sc_detect_card_presence: returning with: 1
0xb724e6c0 14:11:08.748 [pkcs15-init] card.c:115:sc_connect_card: called
0xb724e6c0 14:11:08.748 [pkcs15-init] reader-pcsc.c:444:pcsc_connect: called
0xb724e6c0 14:11:08.748 [pkcs15-init] reader-pcsc.c:277:refresh_attributes: Aktiv Rutoken S 00 00 check
0xb724e6c0 14:11:09.148 [pkcs15-init] reader-pcsc.c:293:refresh_attributes: returning with: 0 (Success)
0xb724e6c0 14:11:09.148 [pkcs15-init] reader-pcsc.c:466:pcsc_connect: Aktiv Rutoken S 00 00:SCardConnect failed: 0x8010000f
0xb724e6c0 14:11:09.148 [pkcs15-init] card.c:231:sc_connect_card: returning with: -1100 (Generic reader error)
Failed to connect to card: Generic reader error
openct-tool list
biiont@bitheap ~ % openct-tool list
0 Rutoken S driver
opensc-tool -l
biiont@bitheap ~ % opensc-tool -l
0xb72536c0 14:12:55.673 [opensc-tool] ctx.c:659:sc_context_create: ===================================
0xb72536c0 14:12:55.673 [opensc-tool] ctx.c:660:sc_context_create: opensc version: 0.12.2
0xb72536c0 14:12:55.673 [opensc-tool] reader-pcsc.c:657:pcsc_init: PC/SC options: connect_exclusive=0 disconnect_action=1 transaction_end_action=0 reconnect_action=0 enable_pinpad=1
0xb72536c0 14:12:55.673 [opensc-tool] reader-pcsc.c:870:pcsc_detect_readers: called
0xb72536c0 14:12:55.673 [opensc-tool] reader-pcsc.c:878:pcsc_detect_readers: Probing pcsc readers
0xb72536c0 14:12:55.673 [opensc-tool] reader-pcsc.c:900:pcsc_detect_readers: Establish pcsc context
0xb72536c0 14:12:55.674 [opensc-tool] reader-pcsc.c:948:pcsc_detect_readers: Found new pcsc reader 'Aktiv Rutoken S 00 00'
0xb72536c0 14:12:55.674 [opensc-tool] reader-pcsc.c:277:refresh_attributes: Aktiv Rutoken S 00 00 check
0xb72536c0 14:12:56.074 [opensc-tool] reader-pcsc.c:301:refresh_attributes: current state: 0x00000022
0xb72536c0 14:12:56.074 [opensc-tool] reader-pcsc.c:302:refresh_attributes: previous state: 0x00000000
0xb72536c0 14:12:56.074 [opensc-tool] reader-pcsc.c:356:refresh_attributes: card present, changed
0xb72536c0 14:12:56.074 [opensc-tool] reader-pcsc.c:979:pcsc_detect_readers: Requesting reader features ...
0xb72536c0 14:12:56.074 [opensc-tool] reader-pcsc.c:993:pcsc_detect_readers: Aktiv Rutoken S 00 00:SCardConnect(SHARED): 0x8010000f
0xb72536c0 14:12:56.074 [opensc-tool] reader-pcsc.c:1023:pcsc_detect_readers: returning with: 0 (Success)
# Detected readers (pcsc)
Nr. Card Features Name
0xb72536c0 14:12:56.074 [opensc-tool] sc.c:195:sc_detect_card_presence: called
0xb72536c0 14:12:56.074 [opensc-tool] reader-pcsc.c:364:pcsc_detect_card_presence: called
0xb72536c0 14:12:56.074 [opensc-tool] reader-pcsc.c:277:refresh_attributes: Aktiv Rutoken S 00 00 check
0xb72536c0 14:12:56.475 [opensc-tool] reader-pcsc.c:293:refresh_attributes: returning with: 0 (Success)
0xb72536c0 14:12:56.475 [opensc-tool] reader-pcsc.c:369:pcsc_detect_card_presence: returning with: 1
0xb72536c0 14:12:56.475 [opensc-tool] sc.c:200:sc_detect_card_presence: returning with: 1
0 Yes Aktiv Rutoken S 00 00
0xb72536c0 14:12:56.475 [opensc-tool] ctx.c:737:sc_release_context: called
0xb72536c0 14:12:56.475 [opensc-tool] reader-pcsc.c:736:pcsc_finish: called
opensc-tool -n
biiont@bitheap ~ % opensc-tool -n
0xb73046c0 14:13:02.097 [opensc-tool] ctx.c:659:sc_context_create: ===================================
0xb73046c0 14:13:02.097 [opensc-tool] ctx.c:660:sc_context_create: opensc version: 0.12.2
0xb73046c0 14:13:02.097 [opensc-tool] reader-pcsc.c:657:pcsc_init: PC/SC options: connect_exclusive=0 disconnect_action=1 transaction_end_action=0 reconnect_action=0 enable_pinpad=1
0xb73046c0 14:13:02.097 [opensc-tool] reader-pcsc.c:870:pcsc_detect_readers: called
0xb73046c0 14:13:02.097 [opensc-tool] reader-pcsc.c:878:pcsc_detect_readers: Probing pcsc readers
0xb73046c0 14:13:02.097 [opensc-tool] reader-pcsc.c:900:pcsc_detect_readers: Establish pcsc context
0xb73046c0 14:13:02.097 [opensc-tool] reader-pcsc.c:948:pcsc_detect_readers: Found new pcsc reader 'Aktiv Rutoken S 00 00'
0xb73046c0 14:13:02.097 [opensc-tool] reader-pcsc.c:277:refresh_attributes: Aktiv Rutoken S 00 00 check
0xb73046c0 14:13:02.498 [opensc-tool] reader-pcsc.c:301:refresh_attributes: current state: 0x00000022
0xb73046c0 14:13:02.498 [opensc-tool] reader-pcsc.c:302:refresh_attributes: previous state: 0x00000000
0xb73046c0 14:13:02.498 [opensc-tool] reader-pcsc.c:356:refresh_attributes: card present, changed
0xb73046c0 14:13:02.498 [opensc-tool] reader-pcsc.c:979:pcsc_detect_readers: Requesting reader features ...
0xb73046c0 14:13:02.498 [opensc-tool] reader-pcsc.c:993:pcsc_detect_readers: Aktiv Rutoken S 00 00:SCardConnect(SHARED): 0x8010000f
0xb73046c0 14:13:02.498 [opensc-tool] reader-pcsc.c:1023:pcsc_detect_readers: returning with: 0 (Success)
0xb73046c0 14:13:02.498 [opensc-tool] sc.c:195:sc_detect_card_presence: called
0xb73046c0 14:13:02.498 [opensc-tool] reader-pcsc.c:364:pcsc_detect_card_presence: called
0xb73046c0 14:13:02.498 [opensc-tool] reader-pcsc.c:277:refresh_attributes: Aktiv Rutoken S 00 00 check
0xb73046c0 14:13:02.898 [opensc-tool] reader-pcsc.c:293:refresh_attributes: returning with: 0 (Success)
0xb73046c0 14:13:02.898 [opensc-tool] reader-pcsc.c:369:pcsc_detect_card_presence: returning with: 1
0xb73046c0 14:13:02.898 [opensc-tool] sc.c:200:sc_detect_card_presence: returning with: 1
Using reader with a card: Aktiv Rutoken S 00 00
0xb73046c0 14:13:02.898 [opensc-tool] sc.c:195:sc_detect_card_presence: called
0xb73046c0 14:13:02.898 [opensc-tool] reader-pcsc.c:364:pcsc_detect_card_presence: called
0xb73046c0 14:13:02.898 [opensc-tool] reader-pcsc.c:277:refresh_attributes: Aktiv Rutoken S 00 00 check
0xb73046c0 14:13:03.299 [opensc-tool] reader-pcsc.c:293:refresh_attributes: returning with: 0 (Success)
0xb73046c0 14:13:03.299 [opensc-tool] reader-pcsc.c:369:pcsc_detect_card_presence: returning with: 1
0xb73046c0 14:13:03.299 [opensc-tool] sc.c:200:sc_detect_card_presence: returning with: 1
0xb73046c0 14:13:03.299 [opensc-tool] card.c:115:sc_connect_card: called
0xb73046c0 14:13:03.299 [opensc-tool] reader-pcsc.c:444:pcsc_connect: called
0xb73046c0 14:13:03.299 [opensc-tool] reader-pcsc.c:277:refresh_attributes: Aktiv Rutoken S 00 00 check
0xb73046c0 14:13:03.699 [opensc-tool] reader-pcsc.c:293:refresh_attributes: returning with: 0 (Success)
0xb73046c0 14:13:03.699 [opensc-tool] reader-pcsc.c:466:pcsc_connect: Aktiv Rutoken S 00 00:SCardConnect failed: 0x8010000f
0xb73046c0 14:13:03.699 [opensc-tool] card.c:231:sc_connect_card: returning with: -1100 (Generic reader error)
Failed to connect to card: Generic reader error
0xb73046c0 14:13:03.699 [opensc-tool] ctx.c:737:sc_release_context: called
0xb73046c0 14:13:03.699 [opensc-tool] reader-pcsc.c:736:pcsc_finish: called
Все комманды выполнялись при debug=6 в файле /etc/opensc/opensc.conf
Дистрибутив: Debian Sid.
Версии ПО:
* openct 0.6.20-1.2
* opensc 0.12.2-2
* pcscd 1.8.2-1
* libccid -1.4.5-1 (с установленной библиотекой и удаленной libccid результат одинаков)