Re: Как правильно устанавливать RuToken в Linux?

Не за что.
openct устаревший проект и нужно постепенно от него отказываться.

Re: Как правильно устанавливать RuToken в Linux?

Кирилл Романовский пишет:

Я имел в виду не длину ключа, а длину айдишника пары, 1024 я указал чтоб не ждать у себя 10 минут, пока сгенерится длинная пара.

Схожая проблема, связка rutoken ECP и ubuntu 12.04 (и 12.10)

root@apetryakov:~# pkcs15-init --erase-card
Using reader with a card: Aktiv Rutoken ECP 00 00
root@apetryakov:~# /usr/bin/pkcs15-init -C --so-pin "87654321" --so-puk ""
Using reader with a card: Aktiv Rutoken ECP 00 00
root@apetryakov:~# /usr/bin/pkcs15-init --store-pin --label "User PIN" --auth-id 02 --pin "12345678" --puk ""
Using reader with a card: Aktiv Rutoken ECP 00 00
Security officer PIN [Security Officer PIN] required.
Please enter Security officer PIN [Security Officer PIN]: 
root@apetryakov:~# pkc
pkcheck       pkcs11-tool   pkcs15-crypt  pkcs15-init   pkcs15-tool   
root@apetryakov:~# pkcs15-init -G rsa/1024 --auth-id 2 --id 2
Using reader with a card: Aktiv Rutoken ECP 00 00
User PIN [User PIN] required.
Please enter User PIN [User PIN]: 
root@apetryakov:~# openssl
OpenSSL> engine -t dynamic -pre SO_PATH:/usr/lib/engines/engine_pkcs11.so -pre ID:pkcs11 -pre LIST_ADD:1 -pre LOAD -pre MODULE_PATH:/usr/lib/opensc-pkcs11.so
(dynamic) Dynamic engine loading support
[Success]: SO_PATH:/usr/lib/engines/engine_pkcs11.so
[Success]: ID:pkcs11
[Success]: LIST_ADD:1
[Success]: LOAD
[Success]: MODULE_PATH:/usr/lib/opensc-pkcs11.so
Loaded: (pkcs11) pkcs11 engine
     [ available ]
OpenSSL> req -engine pkcs11 -new -key slot_1-id_2 -keyform engine -out req.pem -text -x509 -subj "/CN=root"
engine "pkcs11" set.
PKCS#11 token PIN: 
139820310349472:error:8000A005:PKCS11 library:PKCS11_rsa_sign:General Error:p11_ops.c:131:
139820310349472:error:0D0DC006:asn1 encoding routines:ASN1_item_sign_ctx:EVP lib:a_sign.c:314:
error in req

Куда можно посмотреть? Очень хочется использовать rutoken в linux

Re: Как правильно устанавливать RuToken в Linux?

А какие у вас установлены/собраны версии OpenSC и pcsc-lite? У вас OpenCT случайно не установлен? Он может конфликтовать с pcscd.

Сразу могу посоветовать установить только opensc, pcscd и libengine-pkcs11-openssl (с их зависимостями) из репозиториев - все должно сходу работать.
Хорошие примеры команд есть здесь: https://github.com/OpenSC/OpenSC/wiki/A … utoken-ECP

Re: Как правильно устанавливать RuToken в Linux?

Кирилл Романовский пишет:

А какие у вас установлены/собраны версии OpenSC и pcsc-lite? У вас OpenCT случайно не установлен? Он может конфликтовать с pcscd.

Сразу могу посоветовать установить только opensc, pcscd и libengine-pkcs11-openssl (с их зависимостями) из репозиториев - все должно сходу работать.
Хорошие примеры команд есть здесь: https://github.com/OpenSC/OpenSC/wiki/A … utoken-ECP

opensc: 0.12.2-2ubuntu1
pcscd: 1.7.4-2ubuntu2
openct не установлен
за ссылку спасибо, сейчас гляну

Re: Как правильно устанавливать RuToken в Linux?

Здравствуйте.
Не получается на CentOS 6.3 32bit заставить opensc видеть рутокен.

Порядок действий был такой:
1) Компиляция и установка pcsc-lite-1.8.3
#./configure --prefix=/usr --sysconfdir=/etc  --libdir=/usr/lib
#make
#make install
2) Компиляция и установка openct-0.6.20
#./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --enable-usb --enable-pcsc --with-bundle=/usr/lib/pcsc/drivers/
#make
#make install
3) Запуск pcscd
4) Компиляция и установка opensc-0.12.2
#./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --enable-usb --enable-pcsc --with-bundle=/usr/lib/pcsc/drivers/
#make
#make install

В итоге:

#openct-tool atr
Detected Rutoken S driver
Card present, status changed
ATR: 3b 6f 00 ff 00 56 72 75 54 6f 6b 6e 73 30 20 00 00 90 00

#opensc-tool -a
No smart card readers found.

Как собратьпакеты/что установить, чтобы opensc стал видеть РуТокен?

Re: Как правильно устанавливать RuToken в Linux?

Добрый день.
Не видится, потому что вы компилируете pcsc-lite без поддержки openct.

Однако, OpenCT устарел и мы рекомендуем от него отказываться.
Вместо него загрузите и инсталлируйте драйвер Рутокена S отсюда: https://www.rutoken.ru/support/download … s-for-nix/
Исходные коды доступны здесь: https://github.com/AktivCo/rutokens-driver

А openct снесите, не нужен он больше.

Re: Как правильно устанавливать RuToken в Linux?

Да, спасибо, opensc теперь видит рутокен.

Re: Как правильно устанавливать RuToken в Linux?

добрый день. помогите разобраться, куда копать.
Centos 6.3. не видется токен
#opensc-tool -a
No smart card readers found.
всё аналогично сообщению выше. происходит компиляция и установка pcsc-lite-1.8.3, opensc-0.12.2, openct пропускается. ставится драйвер Рутокен S. в lsusb видится устройство 0a89:0020.

Re: Как правильно устанавливать RuToken в Linux?

Здравствуйте.

Остановите, пожалуйста, сервис pcscd и запустите его вручную.
# service pcscd stop
# /usr/sbin/pcscd -afd

Посмотрите, что выводится в логе

(2013-04-26 07:23:46 отредактировано kala4)

Re: Как правильно устанавливать RuToken в Linux?

Останавливается демон смарт-карт PC/SC (pcscd):            [  OK  ]
[root@fssp-image Рабочий стол]# /usr/sbin/pcscd -afd
00000000 pcscdaemon.c:267:main() pcscd set to foreground with debug send to stderr
00000020 debuglog.c:239:DebugLogSetLevel() debug level=debug
00000679 pcscdaemon.c:506:main() pcsc-lite 1.5.2 daemon ready.
00107465 [b]tokenparser.l:131:LTPBundleFindValueWithKey() Could not open bundle file /usr/lib/pcsc/drivers/ifd-RutokenS.bundle.zip/Contents/Info.plist: Not a directory[/b]
00020209 hotplug_libhal.c:307:get_driver() Looking a driver for VID: 0x1D6B, PID: 0x0002
00001049 hotplug_libhal.c:307:get_driver() Looking a driver for VID: 0x1D6B, PID: 0x0001
00001072 hotplug_libhal.c:307:get_driver() Looking a driver for VID: 0x1D6B, PID: 0x0001
00001052 hotplug_libhal.c:307:get_driver() Looking a driver for VID: 0x0A89, PID: 0x0020
00000007 hotplug_libhal.c:342:HPAddDevice() Adding USB device: usb_device_a89_20_noserial_if0
01000687 readerfactory.c:1024:RFInitializeReader() Attempting startup of Aktiv Co. Rutoken S 00 00 using /usr/lib/pcsc/drivers/ifd-rutokens.bundle/Contents/Linux/librutokens.so
00000285 readerfactory.c:877:RFBindFunctions() Loading IFD Handler 3.0
00139327 readerfactory.c:249:RFAddReader() Using the pcscd polling thread
00002773 hotplug_libhal.c:307:get_driver() Looking a driver for VID: 0x1D6B, PID: 0x0001
00001908 hotplug_libhal.c:307:get_driver() Looking a driver for VID: 0x1D6B, PID: 0x0001
00001317 Card ATR: 3B 6F 00 FF 00 56 72 75 54 6F 6B 6E 73 30 20 00 00 90 00 
00002030 winscard_msg_srv.c:239:SHMProcessEventsServer() Common channel packet arrival
00000030 winscard_msg_srv.c:248:SHMProcessEventsServer() SHMProcessCommonChannelRequest detects: 8
00000011 pcscdaemon.c:147:SVCServiceRunLoop() A new context thread creation is requested: 8
00000054 winscard_svc.c:133:ContextThread() Thread is started: 8
00000038 winscard_msg_srv.c:317:SHMProcessEventsContext() command CMD_VERSION received by client 8
00000009 winscard_svc.c:189:ContextThread() Client is protocol version 3:0
00000086 winscard_msg_srv.c:317:SHMProcessEventsContext() command ESTABLISH_CONTEXT received by client 8
00000031 winscard.c:242:SCardEstablishContext() Establishing Context: 16991518
00008105 winscard_msg_srv.c:317:SHMProcessEventsContext() command CONNECT received by client 8
00000016 winscard.c:303:SCardConnect() Attempting Connect to Aktiv Co. Rutoken S 00 00 using protocol: 3
00000018 prothandler.c:128:PHSetProtocol() Attempting PTS to T=0
00000019 winscard.c:449:SCardConnect() Active Protocol: T=0
00000011 winscard.c:459:SCardConnect() hCard Identity: 15001
00054208 utils.c:115:StatSynchronize() status file: /var/run/pcscd.events/event.3731.17002299
00000153 utils.c:123:StatSynchronize() Can't open /var/run/pcscd.events/event.3731.17002299: Bad file descriptor
00033477 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000080 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000062 winscard_msg_srv.c:317:SHMProcessEventsContext() command BEGIN_TRANSACTION received by client 8
00000008 winscard.c:1057:SCardBeginTransaction() Status: 0x00000000
00000058 winscard_msg_srv.c:317:SHMProcessEventsContext() command TRANSMIT received by client 8
00000005 winscard.c:1647:SCardTransmit() Send Protocol: T=0
00000007 APDU: 00 A4 04 00 07 62 76 01 FF 00 00 00 
00008478 SW: 6A 80 
00000117 winscard_msg_srv.c:317:SHMProcessEventsContext() command TRANSMIT received by client 8
00000008 winscard.c:1647:SCardTransmit() Send Protocol: T=0
00000008 APDU: 00 A4 04 00 07 A0 00 00 01 16 DB 00 
00007858 SW: 6A 80 
00000102 winscard_msg_srv.c:317:SHMProcessEventsContext() command TRANSMIT received by client 8
00000015 winscard.c:1647:SCardTransmit() Send Protocol: T=0
00000008 APDU: 00 A4 04 00 07 A0 00 00 00 79 01 00 
00007879 SW: 6A 80 
00000134 winscard_msg_srv.c:317:SHMProcessEventsContext() command TRANSMIT received by client 8
00000011 winscard.c:1647:SCardTransmit() Send Protocol: T=0
00000011 APDU: 00 A4 04 00 09 A0 00 00 03 08 00 00 10 00 
00007843 SW: 6A 80 
00000123 winscard_msg_srv.c:317:SHMProcessEventsContext() command END_TRANSACTION received by client 8
00000011 winscard.c:1208:SCardEndTransaction() Status: 0x00000000
00009176 winscard_msg_srv.c:317:SHMProcessEventsContext() command BEGIN_TRANSACTION received by client 8
00000011 winscard.c:1057:SCardBeginTransaction() Status: 0x00000000
00000113 winscard_msg_srv.c:317:SHMProcessEventsContext() command TRANSMIT received by client 8
00000010 winscard.c:1647:SCardTransmit() Send Protocol: T=0
00000008 APDU: 00 A4 04 00 00 
00007556 SW: 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 6A 80 
00000100 winscard_msg_srv.c:317:SHMProcessEventsContext() command TRANSMIT received by client 8
00000010 winscard.c:1647:SCardTransmit() Send Protocol: T=0
00000008 APDU: 80 CA 9F 7F 2D 
00005880 SW: 6D 00 
00000134 winscard_msg_srv.c:317:SHMProcessEventsContext() command END_TRANSACTION received by client 8
00000011 winscard.c:1208:SCardEndTransaction() Status: 0x00000000
00009802 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000092 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000196 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000099 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000120 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000089 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000089 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000086 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000088 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000085 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000127 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000086 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000093 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000091 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000094 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000099 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000096 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000086 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000089 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000084 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000090 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000084 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000088 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000085 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000106 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000108 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000103 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000092 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000089 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00000086 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 8
00955389 winscard_msg_srv.c:239:SHMProcessEventsServer() Common channel packet arrival
00000024 winscard_msg_srv.c:248:SHMProcessEventsServer() SHMProcessCommonChannelRequest detects: 9
00000006 pcscdaemon.c:147:SVCServiceRunLoop() A new context thread creation is requested: 9
00000043 winscard_svc.c:133:ContextThread() Thread is started: 9
00000024 winscard_msg_srv.c:317:SHMProcessEventsContext() command CMD_VERSION received by client 9
00000006 winscard_svc.c:189:ContextThread() Client is protocol version 3:0
00001504 winscard_msg_srv.c:317:SHMProcessEventsContext() command ESTABLISH_CONTEXT received by client 9
00000020 winscard.c:242:SCardEstablishContext() Establishing Context: 17010994
00000702 winscard_msg_srv.c:317:SHMProcessEventsContext() command CONNECT received by client 9
00000007 winscard.c:303:SCardConnect() Attempting Connect to Aktiv Co. Rutoken S 00 00 using protocol: 3
00000008 winscard.c:449:SCardConnect() Active Protocol: T=0
00000005 winscard.c:459:SCardConnect() hCard Identity: 1f937
00056025 utils.c:115:StatSynchronize() status file: /var/run/pcscd.events/event.4168.16991518
00000202 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000067 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000073 winscard_msg_srv.c:317:SHMProcessEventsContext() command BEGIN_TRANSACTION received by client 9
00000007 winscard.c:1057:SCardBeginTransaction() Status: 0x00000000
00000114 winscard_msg_srv.c:317:SHMProcessEventsContext() command TRANSMIT received by client 9
00000006 winscard.c:1647:SCardTransmit() Send Protocol: T=0
00000007 APDU: 00 A4 04 00 07 62 76 01 FF 00 00 00 
00008988 SW: 6A 80 
00000137 winscard_msg_srv.c:317:SHMProcessEventsContext() command TRANSMIT received by client 9
00000010 winscard.c:1647:SCardTransmit() Send Protocol: T=0
00000014 APDU: 00 A4 04 00 07 A0 00 00 01 16 DB 00 
00007840 SW: 6A 80 
00000151 winscard_msg_srv.c:317:SHMProcessEventsContext() command TRANSMIT received by client 9
00000011 winscard.c:1647:SCardTransmit() Send Protocol: T=0
00000011 APDU: 00 A4 04 00 07 A0 00 00 00 79 01 00 
00007825 SW: 6A 80 
00000111 winscard_msg_srv.c:317:SHMProcessEventsContext() command TRANSMIT received by client 9
00000010 winscard.c:1647:SCardTransmit() Send Protocol: T=0
00000012 APDU: 00 A4 04 00 09 A0 00 00 03 08 00 00 10 00 
00007868 SW: 6A 80 
00000147 winscard_msg_srv.c:317:SHMProcessEventsContext() command END_TRANSACTION received by client 9
00000013 winscard.c:1208:SCardEndTransaction() Status: 0x00000000
00003331 winscard_msg_srv.c:317:SHMProcessEventsContext() command BEGIN_TRANSACTION received by client 9
00000012 winscard.c:1057:SCardBeginTransaction() Status: 0x00000000
00000175 winscard_msg_srv.c:317:SHMProcessEventsContext() command TRANSMIT received by client 9
00000010 winscard.c:1647:SCardTransmit() Send Protocol: T=0
00000009 APDU: 00 A4 04 00 00 
00007314 SW: 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 6A 80 
00000118 winscard_msg_srv.c:317:SHMProcessEventsContext() command TRANSMIT received by client 9
00000010 winscard.c:1647:SCardTransmit() Send Protocol: T=0
00000008 APDU: 80 CA 9F 7F 2D 
00005854 SW: 6D 00 
00000102 winscard_msg_srv.c:317:SHMProcessEventsContext() command END_TRANSACTION received by client 9
00000010 winscard.c:1208:SCardEndTransaction() Status: 0x00000000
00002288 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000090 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000108 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000087 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000097 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000085 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000108 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000085 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000087 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000089 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000096 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000101 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000135 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000092 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000104 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000085 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00113094 utils.c:115:StatSynchronize() status file: /var/run/pcscd.events/event.4168.16991518
02889175 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000101 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000105 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000107 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000119 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000087 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000091 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000086 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000107 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000086 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000103 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000095 winscard_msg_srv.c:317:SHMProcessEventsContext() command DISCONNECT received by client 9
00000012 winscard.c:880:SCardDisconnect() Active Contexts: 2
00020936 utils.c:115:StatSynchronize() status file: /var/run/pcscd.events/event.4168.16991518
00000177 winscard_msg_srv.c:317:SHMProcessEventsContext() command CONNECT received by client 9
00000008 winscard.c:303:SCardConnect() Attempting Connect to Aktiv Co. Rutoken S 00 00 using protocol: 3
00000016 winscard.c:449:SCardConnect() Active Protocol: T=0
00000006 winscard.c:459:SCardConnect() hCard Identity: 1afa4
00025423 utils.c:115:StatSynchronize() status file: /var/run/pcscd.events/event.4168.16991518
00000184 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000059 winscard_msg_srv.c:317:SHMProcessEventsContext() command STATUS received by client 9
00000058 winscard_msg_srv.c:317:SHMProcessEventsContext() command BEGIN_TRANSACTION received by client 9
00000007 winscard.c:1057:SCardBeginTransaction() Status: 0x00000000
00000061 winscard_msg_srv.c:317:SHMProcessEventsContext() command TRANSMIT received by client 9
00000006 winscard.c:1647:SCardTransmit() Send Protocol: T=0
00000007 APDU: 00 A4 04 00 07 62 76 01 FF 00 00 00 
00008834 SW: 6A 80 
00000117 winscard_msg_srv.c:317:SHMProcessEventsContext() command TRANSMIT received by client 9
00000011 winscard.c:1647:SCardTransmit() Send Protocol: T=0
00000011 APDU: 00 A4 04 00 07 A0 00 00 01 16 DB 00 
00007862 SW: 6A 80 
00000137 winscard_msg_srv.c:317:SHMProcessEventsContext() command TRANSMIT received by client 9
00000013 winscard.c:1647:SCardTransmit() Send Protocol: T=0
00000011 APDU: 00 A4 04 00 07 A0 00 00 00 79 01 00 
00007838 SW: 6A 80 
00000111 winscard_msg_srv.c:317:SHMProcessEventsContext() command TRANSMIT received by client 9
00000010 winscard.c:1647:SCardTransmit() Send Protocol: T=0
00000011 APDU: 00 A4 04 00 09 A0 00 00 03 08 00 00 10 00 
00006869 SW: 6A 80 
00000099 winscard_msg_srv.c:317:SHMProcessEventsContext() command END_TRANSACTION received by client 9
00000012 winscard.c:1208:SCardEndTransaction() Status: 0x00000000
00005421 winscard_msg_srv.c:317:SHMProcessEventsContext() command BEGIN_TRANSACTION received by client 9
00000011 winscard.c:1057:SCardBeginTransaction() Status: 0x00000000
00000117 winscard_msg_srv.c:317:SHMProcessEventsContext() command TRANSMIT received by client 9
00000010 winscard.c:1647:SCardTransmit() Send Protocol: T=0
00000009 APDU: 00 A4 04 00 00 
00007331 SW: 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 6A 80 
00000134 winscard_msg_srv.c:317:SHMProcessEventsContext() command TRANSMIT received by client 9
00000012 winscard.c:1647:SCardTransmit() Send Protocol: T=0
00000009 APDU: 80 CA 9F 7F 2D 
00005837 SW: 6D 00 
00000111 winscard_msg_srv.c:317:SHMProcessEventsContext() command END_TRANSACTION received by client 9
00000011 winscard.c:1208:SCardEndTransaction() Status: 0x00000000

выделенное чёрным - в логе обозначено красным

Re: Как правильно устанавливать RuToken в Linux?

Здравствуйте!
Токен: Rutoken S
ОС: Ubuntu 12.04.2 LTS 32-bit
Были установлены пакеты:

  • opensc 0.12.2-2ubuntu1

  • pcscd 1.7.4-2ubuntu2

  • libccid 1.4.5-1

  • драйвер для rutoken S c вашего сайта

Останавливаю pcscd

sudo /etc/init.d/pcscd stop

Запускаю

sudo pcscd -adf

Вставляю токен, результат

00000000 pcscdaemon.c:231:main() pcscd set to foreground with debug send to stdout
00000393 configfile.l:245:DBGetReaderListDir() Parsing conf directory: /etc/reader.conf.d
00002456 configfile.l:287:DBGetReaderList() Parsing conf file: /etc/reader.conf.d/libccidtwin
00000249 pcscdaemon.c:556:main() pcsc-lite 1.7.4 daemon ready.
00005226 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/002/001
00000956 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/002/001
00000644 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x0E0F, PID: 0x0003, path: /dev/bus/usb/002/002
00000424 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x0E0F, PID: 0x0003, path: /dev/bus/usb/002/002
00000371 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/002/001
00000427 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x0E0F, PID: 0x0002, path: /dev/bus/usb/002/003
00000511 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
11598832 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x0A89, PID: 0x0020, path: /dev/bus/usb/002/005
00000027 hotplug_libudev.c:309:HPAddDevice() Adding USB device: Aktiv Co. Rutoken S
00000126 readerfactory.c:934:RFInitializeReader() Attempting startup of Aktiv Co. Rutoken S 00 00 using /usr/lib/pcsc/drivers/ifd-rutokens.bundle/Contents/Linux/librutokens.so
00000314 readerfactory.c:824:RFBindFunctions() Loading IFD Handler 3.0
00029753 readerfactory.c:290:RFAddReader() Using the pcscd polling thread
00011991 eventhandler.c:256:EHStatusHandlerThread() powerState: POWER_STATE_POWERED
00000030 Card ATR: 3B 6F 00 FF 00 56 72 75 54 6F 6B 6E 73 30 20 00 00 90 00 
00406949 eventhandler.c:446:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED

Токен при этом начинает постоянно мигать светодиодом.

На всякий случай pcsc_scan

PC/SC device scanner
V 1.4.18 (c) 2001-2011, Ludovic Rousseau <ludovic.rousseau@free.fr>
Compiled with PC/SC lite version: 1.7.4
Using reader plug'n play mechanism
Scanning present readers...
0: Aktiv Co. Rutoken S 00 00

Sat Apr 27 05:38:48 2013
Reader 0: Aktiv Co. Rutoken S 00 00
  Card state: Card inserted, 
  ATR: 3B 6F 00 FF 00 56 72 75 54 6F 6B 6E 73 30 20 00 00 90 00

ATR: 3B 6F 00 FF 00 56 72 75 54 6F 6B 6E 73 30 20 00 00 90 00
+ TS = 3B --> Direct Convention
+ T0 = 6F, Y(1): 0110, K: 15 (historical bytes)
  TB(1) = 00 --> VPP is not electrically connected
  TC(1) = FF --> Extra guard time: 255 (special value)
+ Historical bytes: 00 56 72 75 54 6F 6B 6E 73 30 20 00 00 90 00
  Category indicator byte: 00 (compact TLV data object)
    Tag: 5, len: 6 (card issuer's data)
      Card issuer data: 72 75 54 6F 6B 6E
    Tag: 7, len: 3 (card capabilities)
      Selection methods: 30
        - DF selection by path
        - DF selection by file identifier
      Data coding byte: 20
        - Behaviour of write functions: proprietary
        - Value 'FF' for the first byte of BER-TLV tag fields: invalid
        - Data unit in quartets: 1
      Command chaining, length fields and logical channels: 00
        - Logical channel number assignment: No logical channel
        - Maximum number of logical channels: 1
    Mandatory status indicator (3 last bytes)
      LCS (life card cycle): 00 (No information given)
      SW: 9000 (Normal processing.)

Possibly identified card (using /usr/share/pcsc/smartcard_list.txt):
3B 6F 00 FF 00 56 72 75 54 6F 6B 6E 73 30 20 00 00 90 00
    ruToken-S (USB token)
    https://www.rutoken.ru/products/rutoken/rutoken-s/

Re: Как правильно устанавливать RuToken в Linux?

Все отлично, у Вас все работает.

Re: Как правильно устанавливать RuToken в Linux?

Доброго дня. Устанавливаю Rutoken S на gentoo х64.
Установлены pcsc-lite, pcsc-tool, ccid, opensc.
Проблема возникла с драйвером токена. Из исходников (по ссылке https://github.com/AktivCo/rutokens-driver) не собирается:
checking for strlcpy... no
checking for LIBUSB... no
no
checking for libusb-config... no
configure: WARNING: libusb-config not found.
checking usb.h usability... no
checking usb.h presence... no
checking for usb.h... no
configure: error: usb.h not found, install libusb or use ./configure LIBUSB_CFLAGS=...

хотя libusb установлен:
# eix libusb
   dev-libs/libusb
     Available versions: 
        (0)     0.1.12-r7^t
        (1)     1.0.9{tbz2}
        {+cxx debug doc static-libs}
     Installed versions:  1.0.9(1){tbz2}(11:45:33 10.01.2013)(-debug -doc -static-libs)
Подскажите, в чем напортачил?

Re: Как правильно устанавливать RuToken в Linux?

Установил libusb-compat, драйвер встал нормально, токен в системе виден.
Пытаюсь проверить:
pkcs11-tool --module /usr/lib/pkcs11-gost/librtpkcs11ecp.so -Ol
No slot with a token was found.
Хотя
# opensc-tool -l
# Detected readers (pcsc)
Nr.  Card  Features  Name
0    Yes             Aktiv Co. Rutoken S 00 00

Re: Как правильно устанавливать RuToken в Linux?

Здравствуйте.

Библиотекой librtpkcs11ecp.so не поддерживается токен Rutoken S.