<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Форум Рутокен &mdash; Rutoken ЭЦП + CA на OpenSSL (RSA)]]></title>
		<link>https://forum.rutoken.ru/topic/2395/</link>
		<atom:link href="https://forum.rutoken.ru/feed/rss/topic/2395/" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «Rutoken ЭЦП + CA на OpenSSL (RSA)».]]></description>
		<lastBuildDate>Wed, 06 Apr 2016 12:20:07 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Rutoken ЭЦП + CA на OpenSSL (RSA)]]></title>
			<link>https://forum.rutoken.ru/post/9532/#p9532</link>
			<description><![CDATA[<div class="quotebox"><cite>Виктор Ткаченко пишет:</cite><blockquote><p>SO_PIN по дефолту 87654321</p></blockquote></div><p>Виктор, я менял дефолтный пароль.</p>]]></description>
			<author><![CDATA[null@example.com (itsec)]]></author>
			<pubDate>Wed, 06 Apr 2016 12:20:07 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/9532/#p9532</guid>
		</item>
		<item>
			<title><![CDATA[Re: Rutoken ЭЦП + CA на OpenSSL (RSA)]]></title>
			<link>https://forum.rutoken.ru/post/9531/#p9531</link>
			<description><![CDATA[<p>SO_PIN по дефолту 87654321</p>]]></description>
			<author><![CDATA[null@example.com (Виктор Ткаченко)]]></author>
			<pubDate>Wed, 06 Apr 2016 10:48:00 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/9531/#p9531</guid>
		</item>
		<item>
			<title><![CDATA[Re: Rutoken ЭЦП + CA на OpenSSL (RSA)]]></title>
			<link>https://forum.rutoken.ru/post/9530/#p9530</link>
			<description><![CDATA[<div class="quotebox"><cite>Виктор Ткаченко пишет:</cite><blockquote><div class="codebox"><pre><code>$ pkcs11-tool --module LIBRARY_PATH --init-token --label LABEL --so-pin SO_PIN
$ pkcs11-tool --module LIBRARY_PATH --login --login-type so --so-pin SO_PIN --init-pin --new-pin USER_PIN
 </code></pre></div><p>Где LIBRARY_PATH – путь к librtpkcs11ecp.so<br />LABEL – ну назовите как-нибудь<br />SO_PIN – PIN администратора<br />USER_PIN – это ваш новый PIN пользователя</p></blockquote></div><p><strong># pkcs11-tool --module /usr/lib/librtpkcs11ecp.so&nbsp; --init-token --label CA --so-pin 12345678</strong><br /></p><div class="codebox"><pre><code>Using slot 0 with a present token (0x0)
error: PKCS11 function C_InitToken failed: rv = unknown PKCS11 error (0x200)
Aborting.</code></pre></div><p>Слот у меня точно 0<br /><strong># pkcs11-tool --module /usr/lib/librtpkcs11ecp.so&nbsp; --list-objects --login</strong><br /></p><div class="codebox"><pre><code>Using slot 0 with a present token (0x0)
Logging in to &quot;CA&quot;.</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (itsec)]]></author>
			<pubDate>Wed, 06 Apr 2016 10:41:44 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/9530/#p9530</guid>
		</item>
		<item>
			<title><![CDATA[Re: Rutoken ЭЦП + CA на OpenSSL (RSA)]]></title>
			<link>https://forum.rutoken.ru/post/9529/#p9529</link>
			<description><![CDATA[<div class="codebox"><pre><code>$ pkcs11-tool --module LIBRARY_PATH --init-token --label LABEL --so-pin SO_PIN
$ pkcs11-tool --module LIBRARY_PATH --login --login-type so --so-pin SO_PIN --init-pin --new-pin USER_PIN
 </code></pre></div><p>Где LIBRARY_PATH – путь к librtpkcs11ecp.so<br />LABEL – ну назовите как-нибудь<br />SO_PIN – PIN администратора<br />USER_PIN – это ваш новый PIN пользователя</p>]]></description>
			<author><![CDATA[null@example.com (Виктор Ткаченко)]]></author>
			<pubDate>Wed, 06 Apr 2016 10:21:58 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/9529/#p9529</guid>
		</item>
		<item>
			<title><![CDATA[Re: Rutoken ЭЦП + CA на OpenSSL (RSA)]]></title>
			<link>https://forum.rutoken.ru/post/9526/#p9526</link>
			<description><![CDATA[<p>Виктор, а какой командой из под консоли мне отформатировать Рутокен ЭЦП?</p>]]></description>
			<author><![CDATA[null@example.com (itsec)]]></author>
			<pubDate>Wed, 06 Apr 2016 05:57:43 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/9526/#p9526</guid>
		</item>
		<item>
			<title><![CDATA[Re: Rutoken ЭЦП + CA на OpenSSL (RSA)]]></title>
			<link>https://forum.rutoken.ru/post/9525/#p9525</link>
			<description><![CDATA[<div class="quotebox"><cite>Виктор Ткаченко пишет:</cite><blockquote><p>Что-то типа</p><div class="codebox"><pre><code>[openssl_def]
engines = engine_section
 
[engine_section]
pkcs11 = pkcs11_section
 
 
[pkcs11_section]
engine_id = pkcs11
dynamic_path = /usr/lib/i386-linux-gnu/openssl-1.0.0/engines/engine_pkcs11.so
MODULE_PATH = /usr/lib/librtpkcs11ecp.so
init = 0</code></pre></div><p>Нужно добавить в конфиг.</p></blockquote></div><p>Спасибо, помогло.<br />Еще в начале дописал строку<br /></p><div class="codebox"><pre><code> openssl_conf = openssl_def</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (itsec)]]></author>
			<pubDate>Tue, 05 Apr 2016 17:30:15 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/9525/#p9525</guid>
		</item>
		<item>
			<title><![CDATA[Re: Rutoken ЭЦП + CA на OpenSSL (RSA)]]></title>
			<link>https://forum.rutoken.ru/post/9523/#p9523</link>
			<description><![CDATA[<p>Что-то типа</p><div class="codebox"><pre><code>[openssl_def]
engines = engine_section
 
[engine_section]
pkcs11 = pkcs11_section
 
 
[pkcs11_section]
engine_id = pkcs11
dynamic_path = /usr/lib/i386-linux-gnu/openssl-1.0.0/engines/engine_pkcs11.so
MODULE_PATH = /usr/lib/librtpkcs11ecp.so
init = 0</code></pre></div><p>Нужно добавить в конфиг.</p>]]></description>
			<author><![CDATA[null@example.com (Виктор Ткаченко)]]></author>
			<pubDate>Tue, 05 Apr 2016 16:56:46 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/9523/#p9523</guid>
		</item>
		<item>
			<title><![CDATA[Re: Rutoken ЭЦП + CA на OpenSSL (RSA)]]></title>
			<link>https://forum.rutoken.ru/post/9522/#p9522</link>
			<description><![CDATA[<div class="quotebox"><cite>Виктор Ткаченко пишет:</cite><blockquote><p>Да</p></blockquote></div><p>Виктор, спасибо! Пошел искать эту строку =)<br />Кстати не подскажите, я каждый раз когда запускаю openssl, то приходится руками подгружать движок и библиотеку<br /></p><div class="codebox"><pre><code>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/librtpkcs11ecp.so</code></pre></div><p>Как мне это в конфиге прописать, чтобы она автоматически при запуске подгружалась?</p>]]></description>
			<author><![CDATA[null@example.com (itsec)]]></author>
			<pubDate>Tue, 05 Apr 2016 16:52:27 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/9522/#p9522</guid>
		</item>
		<item>
			<title><![CDATA[Re: Rutoken ЭЦП + CA на OpenSSL (RSA)]]></title>
			<link>https://forum.rutoken.ru/post/9521/#p9521</link>
			<description><![CDATA[<p>Да</p>]]></description>
			<author><![CDATA[null@example.com (Виктор Ткаченко)]]></author>
			<pubDate>Tue, 05 Apr 2016 16:48:23 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/9521/#p9521</guid>
		</item>
		<item>
			<title><![CDATA[Re: Rutoken ЭЦП + CA на OpenSSL (RSA)]]></title>
			<link>https://forum.rutoken.ru/post/9520/#p9520</link>
			<description><![CDATA[<div class="quotebox"><cite>Виктор Ткаченко пишет:</cite><blockquote><p>Название организации в корневом должно быть таким же, как в запросе.</p><p>Это где-то в конфиге задано.</p></blockquote></div><p>В конфиге есть строка получается, которая требует чтобы имя организации в запросе было такое же что и в корневом сертификате?</p>]]></description>
			<author><![CDATA[null@example.com (itsec)]]></author>
			<pubDate>Tue, 05 Apr 2016 16:46:42 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/9520/#p9520</guid>
		</item>
		<item>
			<title><![CDATA[Re: Rutoken ЭЦП + CA на OpenSSL (RSA)]]></title>
			<link>https://forum.rutoken.ru/post/9519/#p9519</link>
			<description><![CDATA[<p>Название организации в корневом должно быть таким же, как в запросе.</p><p>Это где-то в конфиге задано.</p>]]></description>
			<author><![CDATA[null@example.com (Виктор Ткаченко)]]></author>
			<pubDate>Tue, 05 Apr 2016 16:38:34 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/9519/#p9519</guid>
		</item>
		<item>
			<title><![CDATA[Re: Rutoken ЭЦП + CA на OpenSSL (RSA)]]></title>
			<link>https://forum.rutoken.ru/post/9518/#p9518</link>
			<description><![CDATA[<div class="quotebox"><cite>Виктор Ткаченко пишет:</cite><blockquote><p>Все получилось?</p></blockquote></div><p>Не совсем&nbsp; =)</p><p>Сертификат УЦ делал так</p><div class="codebox"><pre><code>OpenSSL&gt; req -engine pkcs11 -x509 -new -key 99 -keyform engine -out /etc/ssl/demoCA/ca.crt
engine &quot;pkcs11&quot; set.
PKCS#11 token PIN: 
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter &#039;.&#039;, the field will be left blank.
-----
Country Name (2 letter code) [AU]:RU
State or Province Name (full name) [Some-State]:Russian
Locality Name (eg, city) []:Saratov
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Libureg
Organizational Unit Name (eg, section) []:Lib
Common Name (e.g. server FQDN or YOUR name) []:
Email Address []:</code></pre></div><p>Запрос на сертификат клиента</p><div class="codebox"><pre><code>OpenSSL&gt; req -engine pkcs11 -new -key 66 -keyform engine -out /etc/ssl/demoCA/request/matrix.csr
engine &quot;pkcs11&quot; set.
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter &#039;.&#039;, the field will be left blank.
-----
Country Name (2 letter code) [AU]:RU
State or Province Name (full name) [Some-State]:Russian
Locality Name (eg, city) []:Moscow
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Cergont
Organizational Unit Name (eg, section) []:Cer
Common Name (e.g. server FQDN or YOUR name) []:
Email Address []:

Please enter the following &#039;extra&#039; attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:</code></pre></div><p>При попытке подписать ругается</p><div class="codebox"><pre><code>OpenSSL&gt; ca -engine pkcs11 -keyfile 99 -keyform engine -cert /etc/ssl/demoCA/ca.crt -in /etc/ssl/demoCA/request/matrix.csr -out /etc/ssl/demoCA/newcerts/matrix.crt
Using configuration from /usr/lib/ssl/openssl.cnf
engine &quot;pkcs11&quot; set.
Check that the request matches the signature
Signature ok
The organizationName field needed to be the same in the
CA certificate (Libureg) and the request (Cergont)
error in ca</code></pre></div><p>Что-то ему не нравится в структуре сертификатов.</p><p>В конфигурационном файле OpenSSL в секции [req] поправил значение string_mask на pkix. </p><p>Не помогло. Почему может возникать такая ошибка?</p>]]></description>
			<author><![CDATA[null@example.com (itsec)]]></author>
			<pubDate>Tue, 05 Apr 2016 16:25:29 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/9518/#p9518</guid>
		</item>
		<item>
			<title><![CDATA[Re: Rutoken ЭЦП + CA на OpenSSL (RSA)]]></title>
			<link>https://forum.rutoken.ru/post/9517/#p9517</link>
			<description><![CDATA[<p>Все получилось?</p>]]></description>
			<author><![CDATA[null@example.com (Виктор Ткаченко)]]></author>
			<pubDate>Tue, 05 Apr 2016 16:17:17 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/9517/#p9517</guid>
		</item>
		<item>
			<title><![CDATA[Re: Rutoken ЭЦП + CA на OpenSSL (RSA)]]></title>
			<link>https://forum.rutoken.ru/post/9516/#p9516</link>
			<description><![CDATA[<div class="quotebox"><cite>Виктор Ткаченко пишет:</cite><blockquote><p>Так попробуйте:</p><p>openssl ca -engine pkcs11 -keyfile 99 -keyform engine -cert /home/user/ca.crt -in /home/user/test.csr -out /home/user/user-cert.pem</p></blockquote></div><p>Виктор спасибо, но я уже успел разобраться с командой =)</p><div class="codebox"><pre><code>ca -engine pkcs11 -keyfile 99 -keyform engine -cert /etc/ssl/demoCA/ca.crt -in /etc/ssl/demoCA/request/matrix.csr -out /etc/ssl/demoCA/newcerts/matrix.crt</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (itsec)]]></author>
			<pubDate>Tue, 05 Apr 2016 16:15:28 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/9516/#p9516</guid>
		</item>
		<item>
			<title><![CDATA[Re: Rutoken ЭЦП + CA на OpenSSL (RSA)]]></title>
			<link>https://forum.rutoken.ru/post/9515/#p9515</link>
			<description><![CDATA[<p>Так попробуйте:</p><p>openssl ca -engine pkcs11 -keyfile 99 -keyform engine -cert /home/user/ca.crt -in /home/user/test.csr -out /home/user/user-cert.pem</p>]]></description>
			<author><![CDATA[null@example.com (Виктор Ткаченко)]]></author>
			<pubDate>Tue, 05 Apr 2016 15:58:41 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/9515/#p9515</guid>
		</item>
	</channel>
</rss>
