<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Форум Рутокен &mdash; Шаблон сертификата (1.3.6.1.4.1.311.21.7) в createPkcs10]]></title>
	<link rel="self" href="https://forum.rutoken.ru/feed/atom/topic/2573" />
	<updated>2017-08-23T13:25:48Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.rutoken.ru/topic/2573/</id>
		<entry>
			<title type="html"><![CDATA[Re: Шаблон сертификата (1.3.6.1.4.1.311.21.7) в createPkcs10]]></title>
			<link rel="alternate" href="https://forum.rutoken.ru/post/11135/#p11135" />
			<content type="html"><![CDATA[<p>Добрый вечер, <strong>Lokky</strong>.</p><p>В нашу документацию вкралась ошибка, в ближайшее время исправим.<br />Правильный код:<br /></p><div class="codebox"><pre><code>     var options = {
          &quot;subjectSignTool&quot;:     &#039;СКЗИ &quot;РУТОКЕН ЭЦП&quot;&#039;,
          &quot;hashAlgorithm&quot;:       plugin.HASH_TYPE_GOST3411_94,
          &quot;customExtensions&quot;:    [
              {
                  oid: &quot;1.3.6.1.4.1.311.21.7&quot;,
                  value: &quot;MA0GCCqFAwICLgAIAgEB&quot;,
                  criticality: false
              }
          ];
      };</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Владимир Салыкин]]></name>
				<uri>https://forum.rutoken.ru/user/10195/</uri>
			</author>
			<updated>2017-08-23T13:25:48Z</updated>
			<id>https://forum.rutoken.ru/post/11135/#p11135</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Шаблон сертификата (1.3.6.1.4.1.311.21.7) в createPkcs10]]></title>
			<link rel="alternate" href="https://forum.rutoken.ru/post/11134/#p11134" />
			<content type="html"><![CDATA[<p>Разобрался, если кому интересно шаблон указывается ровно как в примере <br /><a href="https://aktivco.github.io/rutoken-plugin-demo/">https://aktivco.github.io/rutoken-plugin-demo/</a></p><p>Работает на 2.8 версии</p><p>Фокус в том, что это не просто base64 строка, а base64 от HEX ASN1 структуры, для шаблона это последовательность: <br />OBJ_ID - oid шаблона<br />Integer - 1</p><p>PHP код примерный:</p><p>$integer = new Integer(1);<br />$oid = new ObjectIdentifier(&#039;1.2.643.2.2.46.0.8&#039;);<br />$sequence = new Sequence($oid, $integer);<br />$myBinary&nbsp; = $sequence-&gt;getBinary();<br />echo base64_encode($myBinary);</p>]]></content>
			<author>
				<name><![CDATA[webnroll]]></name>
				<uri>https://forum.rutoken.ru/user/10750/</uri>
			</author>
			<updated>2017-08-23T13:23:48Z</updated>
			<id>https://forum.rutoken.ru/post/11134/#p11134</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Шаблон сертификата (1.3.6.1.4.1.311.21.7) в createPkcs10]]></title>
			<link rel="alternate" href="https://forum.rutoken.ru/post/11133/#p11133" />
			<content type="html"><![CDATA[<p>Тоесть указать шаблон возможности пока нет совсем?</p>]]></content>
			<author>
				<name><![CDATA[webnroll]]></name>
				<uri>https://forum.rutoken.ru/user/10750/</uri>
			</author>
			<updated>2017-08-23T11:40:03Z</updated>
			<id>https://forum.rutoken.ru/post/11133/#p11133</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Шаблон сертификата (1.3.6.1.4.1.311.21.7) в createPkcs10]]></title>
			<link rel="alternate" href="https://forum.rutoken.ru/post/11130/#p11130" />
			<content type="html"><![CDATA[<p>Добрый день, <strong>webnroll</strong><br />Версия Рутокен Плагин 3.0-бета не поддерживает customExtensions.</p>]]></content>
			<author>
				<name><![CDATA[Владимир Салыкин]]></name>
				<uri>https://forum.rutoken.ru/user/10195/</uri>
			</author>
			<updated>2017-08-23T08:56:28Z</updated>
			<id>https://forum.rutoken.ru/post/11130/#p11130</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Шаблон сертификата (1.3.6.1.4.1.311.21.7) в createPkcs10]]></title>
			<link rel="alternate" href="https://forum.rutoken.ru/post/11129/#p11129" />
			<content type="html"><![CDATA[<p>У меня тотже вопрос. <br />Версия плагина 3.0-бета.</p><p>Пытался указывать расширения имени шаблона:</p><p>&#039;1.3.6.1.4.1.311.21.7&#039;: &#039;User&#039;,</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;customExtensions&quot;:&nbsp; &nbsp; [<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oid: &quot;1.3.6.1.4.1.311.21.7&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value: &quot;User&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; criticality: false<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ]</p><p>При просмотре сформированного запроса в УЦ никаких расширений в запросе нет.</p>]]></content>
			<author>
				<name><![CDATA[webnroll]]></name>
				<uri>https://forum.rutoken.ru/user/10750/</uri>
			</author>
			<updated>2017-08-23T05:06:23Z</updated>
			<id>https://forum.rutoken.ru/post/11129/#p11129</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Шаблон сертификата (1.3.6.1.4.1.311.21.7) в createPkcs10]]></title>
			<link rel="alternate" href="https://forum.rutoken.ru/post/11119/#p11119" />
			<content type="html"><![CDATA[<p>У меня тот же вопрос. <br />Версия плагина обновлена до 2.8.12</p><p>Беру ваш же пример формирования options из документации к этой версии плагина.</p><br /><br /><p>Не отрабатывает. Выдает в консоль ошибку: Exception::defaultErrorCode()<br />Как и описано выше, отрабатывает только при передаче пятым параметром булева значения. А мне нужно, чтоб еще и шаблон сертификата занесся в запросник. Как быть? Демо проект смотрел, разобраться не смог. Формирование options вроде идентично, что в проекте, что у меня. <br /></p><div class="codebox"><pre><code>            var options = {
                &quot;subjectSignTool&quot;:     &#039;СКЗИ &quot;РУТОКЕН ЭЦП&quot;&#039;,
                &quot;hashAlgorithm&quot;:       plugin.GOST3411_94,
                &quot;customExtensions&quot;:    [
                    {
                        oid: &quot;1.3.6.1.4.1.311.21.7&quot;,
                        value: &quot;MA0GCCqFAwICLgAIAgEB&quot;,
                        criticality: false
                    }
                ]
            };

            plugin.createPkcs10(
                deviceId, keyId, subject, extensions, options,
                saveRequestPkcsToBase, errorCallback);</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Lokky]]></name>
				<uri>https://forum.rutoken.ru/user/10603/</uri>
			</author>
			<updated>2017-08-17T12:34:01Z</updated>
			<id>https://forum.rutoken.ru/post/11119/#p11119</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Шаблон сертификата (1.3.6.1.4.1.311.21.7) в createPkcs10]]></title>
			<link rel="alternate" href="https://forum.rutoken.ru/post/11033/#p11033" />
			<content type="html"><![CDATA[<p>Добрый день, <strong>2ndbrezhnev</strong>.</p><p>Извиняюсь за задержку с ответом.<br />На сколько мне известно никаких особенностей в подключении для версии 2.8.10 нет.<br />Актуальная страница для последней версии Рутокен Плагина всегда лежит здесь -<a href="http://%20https://aktivco.github.io/rutoken-plugin-demo/"> https://aktivco.github.io/rutoken-plugin-demo/</a></p><p>Там вы найдете пример с использованием subjectSignTool и кодом.</p>]]></content>
			<author>
				<name><![CDATA[Владимир Салыкин]]></name>
				<uri>https://forum.rutoken.ru/user/10195/</uri>
			</author>
			<updated>2017-07-13T11:13:36Z</updated>
			<id>https://forum.rutoken.ru/post/11033/#p11033</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Шаблон сертификата (1.3.6.1.4.1.311.21.7) в createPkcs10]]></title>
			<link rel="alternate" href="https://forum.rutoken.ru/post/10979/#p10979" />
			<content type="html"><![CDATA[<p>Здравствуйте</p><p>Некоторое время назад отправлял письмо с аналогичным вопросом по поводу версии планига 3.0 [Ticket#1015950]</p><p>Для формирования запроса на сертификат использую метод createPkcs10<br />Для выпуска сертификата необходимо указание шаблона сертификата (1.3.6.1.4.1.311.21.7) в расширениях.</p><p>Судя по документации <a href="https://dev.rutoken.ru/pages/viewpage.action?pageId=25100293">https://dev.rutoken.ru/pages/viewpage.a … d=25100293</a> <br />возможность такая появилась.</p><p>Обновил версию плагина до 2.8.10, но не удаётся выполнить метод createPkcs10 в том виде, в каком он описан в документации.</p><p>Вывод console.log(plugin.version); возвращает 2.8.10.0, из чего сужу, что плагин обновлён на рабочем месте.</p><p>Если в качестве 5го параметра использовать структуру </p><p>&nbsp; &nbsp; &nbsp; var options = {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;subjectSignTool&quot;:&nbsp; &nbsp; &nbsp;&#039;СКЗИ &quot;РУТОКЕН ЭЦП&quot;&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ...<br />&nbsp; &nbsp; &nbsp; };</p><p>так, как указано в документации, то метод createPkcs10&nbsp; возвращает ошибку BAD_PARAMS.</p><p>Если использую метод createPkcs10&nbsp; &nbsp;как в версии 2.8.4 с указанием includeSubjSignTool в качестве 5го параметра, то отрабатывает успешно.</p><p>Существует ли какая-нибудь тестовая страница, где бы использовался код скрипта для версии 2.8.10, чтобы можно было проверить установку плагина.<br />Или может быть существует версия plugin-sdk-2.8.10.0?</p><p>Возможно для версии 2.8.10 существуют какие-то особенности в подключении скрипта?</p>]]></content>
			<author>
				<name><![CDATA[2ndbrezhnev]]></name>
				<uri>https://forum.rutoken.ru/user/10624/</uri>
			</author>
			<updated>2017-07-05T10:24:28Z</updated>
			<id>https://forum.rutoken.ru/post/10979/#p10979</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Шаблон сертификата (1.3.6.1.4.1.311.21.7) в createPkcs10]]></title>
			<link rel="alternate" href="https://forum.rutoken.ru/post/10896/#p10896" />
			<content type="html"><![CDATA[<p>Из сообщения техподдержки от 14 марта 2017:<br />&quot;К сожалению, в текущем релизе Рутокен Плагин (и в 2.8.4 и в 3.0-beta) такая возможность отсутствует.<br />Мы планируем добавить этот функционал в следующем релизе Рутокен Плагин.&quot;</p><p>Вопросом этим больше не занимался</p>]]></content>
			<author>
				<name><![CDATA[2ndbrezhnev]]></name>
				<uri>https://forum.rutoken.ru/user/10624/</uri>
			</author>
			<updated>2017-05-26T13:07:43Z</updated>
			<id>https://forum.rutoken.ru/post/10896/#p10896</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Шаблон сертификата (1.3.6.1.4.1.311.21.7) в createPkcs10]]></title>
			<link rel="alternate" href="https://forum.rutoken.ru/post/10895/#p10895" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>2ndbrezhnev пишет:</cite><blockquote><p>Как необходимо указать шаблон сертификата в методе createPkcs10 плагина &quot;Рутокен Плагин 3.0&quot;?</p></blockquote></div><p>Добрый день.</p><p>У вас получилось указать шаблон сертификата?</p>]]></content>
			<author>
				<name><![CDATA[daniil.gorokh]]></name>
				<uri>https://forum.rutoken.ru/user/10693/</uri>
			</author>
			<updated>2017-05-26T12:59:10Z</updated>
			<id>https://forum.rutoken.ru/post/10895/#p10895</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Шаблон сертификата (1.3.6.1.4.1.311.21.7) в createPkcs10]]></title>
			<link rel="alternate" href="https://forum.rutoken.ru/post/10529/#p10529" />
			<content type="html"><![CDATA[<p>Добрый день</p><p>Для создания запроса используется &quot;Рутокен Плагин 3.0&quot;<br />и следующий код:</p><div class="codebox"><pre><code>...
var keyUsageVal = [...];
var extKeyUsageVal = [...];
var extensions = {
    &quot;keyUsage&quot;:     keyUsageVal,
    &quot;extKeyUsage&quot;:  extKeyUsageVal,
    &quot;1.3.6.1.4.1.311.21.7&quot;: &quot;ASN1:SEQUENCE:CertificateTemplateOID\\n[CertificateTemplateOID]\\ntemplateID=OID:1.2.3\\ntemplateMajorVersion=INTEGER:1\\ntemplateMinorVersion=INTEGER:0&quot;
};

var includeSubjectSignToolExt = true;

plugin.createPkcs10(device_id, key, subject, extensions, includeSubjectSignToolExt, function (res) {...}, function(error){...});</code></pre></div><br /><p>В результате получается запрос с Расширениями сертификата keyUsageVal, extKeyUsage и средством электронной подписи (1.2.643.100.111), <br />но в запросе нет шаблона сертификата (1.3.6.1.4.1.311.21.7&quot;)</p><p>Как необходимо указать шаблон сертификата в методе createPkcs10 плагина &quot;Рутокен Плагин 3.0&quot;?</p>]]></content>
			<author>
				<name><![CDATA[2ndbrezhnev]]></name>
				<uri>https://forum.rutoken.ru/user/10624/</uri>
			</author>
			<updated>2017-03-06T21:17:50Z</updated>
			<id>https://forum.rutoken.ru/post/10529/#p10529</id>
		</entry>
</feed>
