Форум русскоязычного сообщества Ubuntu


Следите за новостями русскоязычного сообщества Ubuntu в Twitter-ленте @ubuntu_ru_loco

Автор Тема: Установка КриптоПро в Ubuntu18.04  (Прочитано 9793 раз)

0 Пользователей и 1 Гость просматривают эту тему.

virgan

  • Автор темы
  • Гость
Установка КриптоПро в Ubuntu18.04
« : 13 Марта 2019, 18:26:21 »
Уважаемые профи. Пожалуйста ПМОГИТЕ. Программа ставится криво. А именно - выполняя установку по инструкции дошел до того места, где требовалось проверить подключение Токенов к USB разъемам.
[b]/opt/cprocsp/bin/amd64/csptest -card -enum -v -v[/b]

Aktiv Co. Rutoken S 00 00
  Card present, ATR=3B 6F 00 FF 00 56 72 75 54 6F 6B 6E 73 30 20 00 00 90 00
  [b]Unknown applet[/b]
Aktiv Co. Rutoken S 01 00
  Card present, ATR=3B 6F 00 FF 00 56 72 75 54 6F 6B 6E 73 30 20 00 00 90 00
  [b]Unknown applet[/b]
Total: SYS: 0,000 sec USR: 0,000 sec UTC: 0,060 sec
[ErrorCode: 0x00000000]


По хорошему должно было получиться так

Aktiv Co. Rutoken S 00 00
  Card present, ATR=3B 6F 00 FF 00 56 72 75 54 6F 6B 6E 73 30 20 00 00 90 00
  CSP-applet
Aktiv Co. Rutoken S 01 00
  Card present, ATR=3B 6F 00 FF 00 56 72 75 54 6F 6B 6E 73 30 20 00 00 90 00
  CSP-applet
Total: SYS: 0,000 sec USR: 0,000 sec UTC: 0,060 sec
[ErrorCode: 0x00000000]

Модули для Джакарты не ставил - не пользуюсь потому что. А что здесь не так не понимаю. Все делал по этой инструкции. Остановился на 11 странице. Помогите пожалуйста. Не с чем работать. Пожалуйста. Спасибо.

Оффлайн bezbo

  • Старожил
  • *
  • Сообщений: 1749
    • Просмотр профиля
Re: Установка КриптоПро в Ubuntu18.04
« Ответ #1 : 13 Марта 2019, 18:30:55 »
если у вас rutoken ЭЦП, посмотрите инструкцию

virgan

  • Автор темы
  • Гость
Re: Установка КриптоПро в Ubuntu18.04
« Ответ #2 : 13 Марта 2019, 18:54:01 »
Посмотрел инструкцию. выполнил начальные действия по ней. Но когда этого НИКОГДА не делал сложно понять все в порядке или нет. К сожалению я не понимаю то, что отображается в терминале.
pcsc_scan
PC/SC device scanner
V 1.5.2 (c) 2001-2017, Ludovic Rousseau <ludovic.rousseau@free.fr>
Using reader plug'n play mechanism
Scanning present readers...
0: Aktiv Co. Rutoken S 00 00
1: Aktiv Co. Rutoken S 01 00
 
Wed Mar 13 18:38:34 2019
 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)
http://www.rutoken.ru/products/rutoken/rutoken-s/

 Reader 1: Aktiv Co. Rutoken S 01 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)
http://www.rutoken.ru/products/rutoken/rutoken-s/


При этом ключи мигают, а в терминале в самом низу вращается курсор.
« Последнее редактирование: 13 Марта 2019, 18:55:56 от virgan »

Оффлайн bezbo

  • Старожил
  • *
  • Сообщений: 1749
    • Просмотр профиля
Re: Установка КриптоПро в Ubuntu18.04
« Ответ #3 : 13 Марта 2019, 19:06:32 »
а что вас смущает?
Rutoken S определился в кол-ве двух штук.
Двигайтесь дальше по инструкции...

virgan

  • Автор темы
  • Гость
Re: Установка КриптоПро в Ubuntu18.04
« Ответ #4 : 13 Марта 2019, 19:23:11 »
Понял. Иду дальше. Скажите пожалуйста, а как ввести серийник?
cpconfig -license -view

Command 'cpconfig' not found, did you mean:

  command 'ccconfig' from deb libconvert-binary-c-perl
  command 'cyconfig' from deb cyphesis-cpp-clients

Try: sudo apt install <deb name>



Пользователь добавил сообщение 13 Марта 2019, 19:34:35:
Понял
/opt/cprocsp/sbin/amd64/cpconfig -license -view
License validity:
4040E-G0037-EK8R3-C6K4U-HCXQG
Expires: 3 month(s) 3 day(s)
License type: Server.

« Последнее редактирование: 13 Марта 2019, 19:35:10 от virgan »

Оффлайн bezbo

  • Старожил
  • *
  • Сообщений: 1749
    • Просмотр профиля
Re: Установка КриптоПро в Ubuntu18.04
« Ответ #5 : 13 Марта 2019, 20:11:22 »
вы бы тут не светили лицензиями, ключами и т.д.

virgan

  • Автор темы
  • Гость
Re: Установка КриптоПро в Ubuntu18.04
« Ответ #6 : 13 Марта 2019, 20:17:46 »
А это 30 дневная. она со всеми продуктами идет. тут хуже гораздо. По инструкции дошел до
pkcs11-tool --module /usr/lib/librtpkcs11ecp.so -O
No slot with a token was found.

И что делать дальше хоть убейте не знаю.

Пользователь добавил сообщение 13 Марта 2019, 20:31:25:
Люди отзовитесь, ну пожалуйст=а((((
« Последнее редактирование: 13 Марта 2019, 20:31:25 от virgan »

Оффлайн bezbo

  • Старожил
  • *
  • Сообщений: 1749
    • Просмотр профиля
Re: Установка КриптоПро в Ubuntu18.04
« Ответ #7 : 13 Марта 2019, 20:32:06 »
Общий порядок действий

1. Устанавливаем необходимые пакеты:

 $ sudo apt-get install opensc  libpam-p11 libengine-pkcs11-openssl

При установке opensc также устанавливаются пакеты libccid и pcscd, а при установке libpam-p11 – пакет libp11-2.

2. Библиотеку librtpkcs11ecp.so помещаем в директорию /usr/lib/.

3. Аналогично действиям в приведенной выше статье создаем файл /usr/share/pam-configs/p11, с единственным отличием – укажем путь к нашей библиотеке:

Name: Pam_p11
Default: yes
Priority: 800
Auth-Type: Primary
Auth: sufficient pam_p11_opensc.so /usr/lib/librtpkcs11ecp.so

4. Выполняем команду:

$ sudo pam-auth-update

В появившемся диалоге выбираем Pam_p11.

virgan

  • Автор темы
  • Гость
Re: Установка КриптоПро в Ubuntu18.04
« Ответ #8 : 13 Марта 2019, 20:43:07 »
При установке opensc также устанавливаются пакеты libccid и pcscd, а при установке libpam-p11 – пакет libp11-2.

А их надо ставить, как-то отдельно? Потому, что в терминале при установке я их не видел.

sudo apt-get install opensc  libpam-p11 libengine-pkcs11-openssl
Чтение списков пакетов… Готово
Построение дерева зависимостей       
Чтение информации о состоянии… Готово
Уже установлен пакет opensc самой новой версии (0.17.0-3).
Следующие НОВЫЕ пакеты будут установлены:
  libengine-pkcs11-openssl libp11-3 libpam-p11
Обновлено 0 пакетов, установлено 3 новых пакетов, для удаления отмечено 0 пакетов, и 45 пакетов не обновлено.
Необходимо скачать 62,9 kB архивов.
После данной операции объём занятого дискового пространства возрастёт на 223 kB.
Пол:1 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libengine-pkcs11-openssl amd64 0.4.7-3 [29,8 kB]
Пол:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 libp11-3 amd64 0.4.7-3 [22,4 kB]
Пол:3 http://archive.ubuntu.com/ubuntu bionic/main amd64 libpam-p11 amd64 0.1.6-3 [10,7 kB]
Получено 62,9 kB за 1с (117 kB/s)         
Выбор ранее не выбранного пакета libengine-pkcs11-openssl:amd64.
(Чтение базы данных … на данный момент установлено 244987 файлов и каталогов.)
Подготовка к распаковке …/libengine-pkcs11-openssl_0.4.7-3_amd64.deb …
Распаковывается libengine-pkcs11-openssl:amd64 (0.4.7-3) …
Выбор ранее не выбранного пакета libp11-3:amd64.
Подготовка к распаковке …/libp11-3_0.4.7-3_amd64.deb …
Распаковывается libp11-3:amd64 (0.4.7-3) …
Выбор ранее не выбранного пакета libpam-p11:amd64.
Подготовка к распаковке …/libpam-p11_0.1.6-3_amd64.deb …
Распаковывается libpam-p11:amd64 (0.1.6-3) …
Настраивается пакет libengine-pkcs11-openssl:amd64 (0.4.7-3) …
Обрабатываются триггеры для libc-bin (2.27-3ubuntu1) …
Настраивается пакет libp11-3:amd64 (0.4.7-3) …
Настраивается пакет libpam-p11:amd64 (0.1.6-3) …
Обрабатываются триггеры для libc-bin (2.27-3ubuntu1) …


А если отдельно, то как? Спасибо.

Оффлайн bezbo

  • Старожил
  • *
  • Сообщений: 1749
    • Просмотр профиля
Re: Установка КриптоПро в Ubuntu18.04
« Ответ #9 : 13 Марта 2019, 20:53:38 »
зависимые пакеты устанавливаются автоматом

virgan

  • Автор темы
  • Гость
Re: Установка КриптоПро в Ubuntu18.04
« Ответ #10 : 13 Марта 2019, 20:55:19 »
Дело в том, что пакета libp11-2 в менеджере пакетов нет. Могло быть такое, что он сам не установился?


Пользователь добавил сообщение 13 Марта 2019, 21:15:26:
Сделал все, как сказали
pkcs11-tool --module /usr/lib/librtpkcs11ecp.so -O
No slot with a token was found.

Ну как же так?

Пользователь добавил сообщение 13 Марта 2019, 21:16:29:
Может еще что-то надо сделать??
« Последнее редактирование: 13 Марта 2019, 21:16:29 от virgan »

Оффлайн bezbo

  • Старожил
  • *
  • Сообщений: 1749
    • Просмотр профиля
Re: Установка КриптоПро в Ubuntu18.04
« Ответ #11 : 13 Марта 2019, 21:19:49 »
если что-то не работает, то будем искать

pcsc_scan?
« Последнее редактирование: 13 Марта 2019, 21:24:21 от bezbo »

virgan

  • Автор темы
  • Гость
Re: Установка КриптоПро в Ubuntu18.04
« Ответ #12 : 13 Марта 2019, 21:33:48 »
pcsc_scan
PC/SC device scanner
V 1.5.2 (c) 2001-2017, Ludovic Rousseau <ludovic.rousseau@free.fr>
Using reader plug'n play mechanism
Scanning present readers...
0: Aktiv Co. Rutoken S 00 00
 
Wed Mar 13 21:33:00 2019
 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)
http://www.rutoken.ru/products/rutoken/rutoken-s/


Оффлайн bezbo

  • Старожил
  • *
  • Сообщений: 1749
    • Просмотр профиля
Re: Установка КриптоПро в Ubuntu18.04
« Ответ #13 : 13 Марта 2019, 21:41:34 »
dpkg -s libccid libpcsclite1 pcscd pcsc-tools opensc?

virgan

  • Автор темы
  • Гость
Re: Установка КриптоПро в Ubuntu18.04
« Ответ #14 : 13 Марта 2019, 21:42:53 »
dpkg -s libccid libpcsclite1 pcscd pcsc-tools opensc
Package: libccid
Status: install ok installed
Priority: extra
Section: libs
Installed-Size: 290
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Source: ccid
Version: 1.4.29-1
Provides: pcsc-ifd-handler
Depends: libc6 (>= 2.15), libusb-1.0-0 (>= 2:1.0.9)
Suggests: pcmciautils
Conffiles:
 /etc/libccid_Info.plist e9e099bc066257961afb016d42d470f2
 /etc/reader.conf.d/libccidtwin fd8518f7c253ca493803426dad732fac
Description: PC/SC driver for USB CCID smart card readers
 This library provides a PC/SC IFD handler implementation for the USB smart
 card drivers compliant to the CCID protocol.
 .
 This package is needed to communicate with the CCID smartcard readers through
 the PC/SC Lite resource manager (pcscd).
 .
 For an exhaustive list of supported reader see
 http://pcsclite.alioth.debian.org/section.html
 .
 This driver also supports the GemPC Twin connected to a serial port and
 the GemPC Card (PCMCIA, through the suggested pcmciautils package) and
 Gemplus GemPC Express (Express54 card).
Original-Maintainer: Ludovic Rousseau <rousseau@debian.org>
Homepage: http://pcsclite.alioth.debian.org/ccid.html

Package: libpcsclite1
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 70
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Multi-Arch: same
Source: pcsc-lite
Version: 1.8.23-1
Depends: libc6 (>= 2.15)
Suggests: pcscd (= 1.8.23-1)
Breaks: libpcsclite-dev (<< 1.8.23-1), pcscd (<< 1.8.23-1)
Description: Middleware to access a smart card using PC/SC (library)
 The purpose of PC/SC Lite is to provide a Windows(R) SCard interface
 in a very small form factor for communicating to smartcards and
 readers.
 .
 The PC/SC Lite library is used to connect to the PC/SC daemon from
 a client application and provide access to the desired reader.
Original-Maintainer: Ludovic Rousseau <rousseau@debian.org>
Homepage: http://pcsclite.alioth.debian.org/

Package: pcscd
Status: install ok installed
Priority: optional
Section: misc
Installed-Size: 172
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Source: pcsc-lite
Version: 1.8.23-1
Depends: libccid (>= 1.4.1~) | pcsc-ifd-handler, libc6 (>= 2.15), libsystemd0, libudev1 (>= 183), lsb-base (>= 3.0-6), libpcsclite1 (= 1.8.23-1)
Suggests: systemd
Conffiles:
 /etc/init.d/pcscd 9e2fea301957835841f6051e8c6e3ac2
Description: Middleware to access a smart card using PC/SC (daemon side)
 The purpose of PC/SC Lite is to provide a Windows(R) SCard interface
 in a very small form factor for communicating to smart cards and
 smart cards readers.
 .
 The PC/SC daemon is used to dynamically allocate/deallocate reader
 drivers at runtime and manage connections to the readers.
Original-Maintainer: Ludovic Rousseau <rousseau@debian.org>
Homepage: http://pcsclite.alioth.debian.org/

Package: pcsc-tools
Status: install ok installed
Priority: extra
Section: utils
Installed-Size: 370
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Version: 1.5.2-2
Depends: libc6 (>= 2.4), libpcsclite1 (>= 1.3.0), libpcsc-perl, libgtk2-perl
Description: Some tools to use with smart cards and PC/SC
 This archive contains some tools useful for a PC/SC user. The tools
 provided are:
 .
 pcsc_scan(1) scans available smart card readers and print detected
 events: card insertion with ATR, card removal;
 .
 ATR_analysis(1) analyses a smart card ATR (Answer To Reset)
 .
 scriptor(1) Perl script to send commands to a smart card using a
 batch file or stdin;
 .
 gscriptor(1) the same idea as scriptor.pl(1) but with Perl-Gtk GUI.
Original-Maintainer: Ludovic Rousseau <rousseau@debian.org>
Homepage: http://ludovic.rousseau.free.fr/softwares/pcsc-tools/

Package: opensc
Status: install ok installed
Priority: optional
Section: utils
Installed-Size: 1021
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Multi-Arch: foreign
Version: 0.17.0-3
Depends: opensc-pkcs11 (= 0.17.0-3), libc6 (>= 2.14), libreadline7 (>= 6.0), libssl1.1 (>= 1.1.0)
Recommends: pcscd
Conflicts: mozilla-opensc
Conffiles:
 /etc/opensc/opensc.conf 27e41cf121c6f5382773723b0cb5403f
Description: Smart card utilities with support for PKCS#15 compatible cards
 OpenSC provides a set of libraries and utilities to access smart
 cards.  It mainly focuses on cards that support cryptographic
 operations. It facilitates their use in security applications such as
 mail encryption, authentication, and digital signature. OpenSC
 implements the PKCS#11 API. Applications supporting this API, such as
 Iceweasel and Icedove, can use it. OpenSC implements the PKCS#15
 standard and aims to be compatible with all software that does so as
 well.
 .
 Before purchasing any cards, please read carefully documentation in
 /usr/share/doc/opensc/html/wiki/index.html - only some cards are
 supported. Not only does card type matters, but also card version,
 card OS version and preloaded applet. Only a subset of possible
 operations may be supported for your card. Card initialization may
 require third party proprietary software.
 .
 This package contains tools for interacting with smart cards.
Original-Maintainer: Debian OpenSC Maintainers <pkg-opensc-maint@lists.alioth.debian.org>
Homepage: https://github.com/OpenSC/OpenSC/wiki

 

Страница сгенерирована за 0.048 секунд. Запросов: 25.