<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Форум Рутокен &mdash; Rutoken 4.4.1 (mac) vs 4.0.1 (windows)]]></title>
		<link>https://forum.rutoken.ru/topic/3043/</link>
		<atom:link href="https://forum.rutoken.ru/feed/rss/topic/3043/" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «Rutoken 4.4.1 (mac) vs 4.0.1 (windows)».]]></description>
		<lastBuildDate>Thu, 03 Oct 2019 11:50:55 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Rutoken 4.4.1 (mac) vs 4.0.1 (windows)]]></title>
			<link>https://forum.rutoken.ru/post/13345/#p13345</link>
			<description><![CDATA[<div class="quotebox"><cite>mihail910 пишет:</cite><blockquote><p>Такие входные параметры в функцию generateKeyPair и createPkcs10<br /></p><div class="codebox"><pre><code>Вызов - generateKeyPair(this.token.id, &#039;A&#039;, containerName, options)
generateKeyPair. params - deviceId, reserved, marker, options
deviceId === token.id
0
reserved === &quot;A&quot;
A
marker === containerName
kratkoe_3001688_1570097621747
options
{publicKeyAlgorithm: 4, paramset: &quot;A&quot;, signatureSize: 1024}

Вызов createPkcs10(this.token.id, containerId, subject, extensions, options)
createPkcs10. params - deviceId, keyId, subject, extensions, options
deviceId === token.id
0
keyId === containerId ( из вызова generateKeyPair )
72:8a:46:e7:c2:37:b2:86:f2:54:b4:21:99:1d:ed:05:fe:91:16:ba
subject
(12) [{rdn: &quot;commonName&quot;, value: &quot;Краткое 30016889998&quot;}1: {rdn: &quot;organizationName&quot;, value: &quot;Краткое 300168876767&quot;}2: {rdn: &quot;countryName&quot;, value: &quot;BY&quot;}3: {rdn: &quot;stateOrProvinceName&quot;, value: &quot;50 Московская область&quot;}4: {rdn: &quot;localityName&quot;, value: &quot;Г Моска&quot;}5: {rdn: &quot;INN&quot;, value: &quot;99999999999&quot;}6: {rdn: &quot;SNILS&quot;, value: &quot;00000000000&quot;}7: {rdn: &quot;OGRN&quot;, value: &quot;0000002221688&quot;}8: {rdn: &quot;title&quot;, value: &quot;Главный&quot;}9: {rdn: &quot;2.5.4.9&quot;, value: &quot;infr_name : (чистка), 0&quot;}10: {rdn: &quot;surname&quot;, value: &quot;Клиент:&quot;}11: {rdn: &quot;givenName&quot;, value: &quot;2257940 &quot;}]
extensions
{}
options
{hashAlgorithm: 2}</code></pre></div><div class="quotebox"><cite>Павел Анфимов пишет:</cite><blockquote><p>Сделайте, пожалуйста, дамп всех параметров передающихся в функию createPkcs10.</p></blockquote></div></blockquote></div><p>Дело вот в чем: вы создали ключ по алгоритму PUBLIC_KEY_ALGORITHM_GOST3410_2012_512 (значение <strong>4</strong>) , а в функцию создания запроса передаете алгоритм хеша HASH_TYPE_GOST3411_12_256 (значение <strong>2</strong>). Чтобы заработало надо передавать HASH_TYPE_GOST3411_12_512 (значение <strong>4</strong>).</p>]]></description>
			<author><![CDATA[null@example.com (Павел Анфимов)]]></author>
			<pubDate>Thu, 03 Oct 2019 11:50:55 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/13345/#p13345</guid>
		</item>
		<item>
			<title><![CDATA[Re: Rutoken 4.4.1 (mac) vs 4.0.1 (windows)]]></title>
			<link>https://forum.rutoken.ru/post/13343/#p13343</link>
			<description><![CDATA[<p>Такие входные параметры в функцию generateKeyPair и createPkcs10<br /></p><div class="codebox"><pre><code>Вызов - generateKeyPair(this.token.id, &#039;A&#039;, containerName, options)
generateKeyPair. params - deviceId, reserved, marker, options
deviceId === token.id
0
reserved === &quot;A&quot;
A
marker === containerName
kratkoe_3001688_1570097621747
options
{publicKeyAlgorithm: 4, paramset: &quot;A&quot;, signatureSize: 1024}

Вызов createPkcs10(this.token.id, containerId, subject, extensions, options)
createPkcs10. params - deviceId, keyId, subject, extensions, options
deviceId === token.id
0
keyId === containerId ( из вызова generateKeyPair )
72:8a:46:e7:c2:37:b2:86:f2:54:b4:21:99:1d:ed:05:fe:91:16:ba
subject
(12) [{rdn: &quot;commonName&quot;, value: &quot;Краткое 30016889998&quot;}1: {rdn: &quot;organizationName&quot;, value: &quot;Краткое 300168876767&quot;}2: {rdn: &quot;countryName&quot;, value: &quot;BY&quot;}3: {rdn: &quot;stateOrProvinceName&quot;, value: &quot;50 Московская область&quot;}4: {rdn: &quot;localityName&quot;, value: &quot;Г Моска&quot;}5: {rdn: &quot;INN&quot;, value: &quot;99999999999&quot;}6: {rdn: &quot;SNILS&quot;, value: &quot;00000000000&quot;}7: {rdn: &quot;OGRN&quot;, value: &quot;0000002221688&quot;}8: {rdn: &quot;title&quot;, value: &quot;Главный&quot;}9: {rdn: &quot;2.5.4.9&quot;, value: &quot;infr_name : (чистка), 0&quot;}10: {rdn: &quot;surname&quot;, value: &quot;Клиент:&quot;}11: {rdn: &quot;givenName&quot;, value: &quot;2257940 &quot;}]
extensions
{}
options
{hashAlgorithm: 2}</code></pre></div><div class="quotebox"><cite>Павел Анфимов пишет:</cite><blockquote><p>Сделайте, пожалуйста, дамп всех параметров передающихся в функию createPkcs10.</p></blockquote></div>]]></description>
			<author><![CDATA[null@example.com (mihail910)]]></author>
			<pubDate>Thu, 03 Oct 2019 10:18:07 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/13343/#p13343</guid>
		</item>
		<item>
			<title><![CDATA[Re: Rutoken 4.4.1 (mac) vs 4.0.1 (windows)]]></title>
			<link>https://forum.rutoken.ru/post/13342/#p13342</link>
			<description><![CDATA[<div class="quotebox"><cite>mihail910 пишет:</cite><blockquote><p>я немного сократил код, параметры обозначил.<br />суть то в том, что на windows 4.0.1 работает, на mac 4.4.1 не работает. <br /></p><div class="quotebox"><cite>Павел Анфимов пишет:</cite><blockquote><div class="quotebox"><cite>mihail910 пишет:</cite><blockquote><div class="codebox"><pre><code>    return await new Promise((resolve, reject) =&gt; {
      console.log(options); // {paramset: &quot;A&quot;, publicKeyAlgorithm: 4, signatureSize: 1024 } ПЕРЕДАЕТСЯ В GENERATEKEYPAIR
      this.plugin.generateKeyPair(this.token.id, &#039;A&#039;, containerName, options)
        .then((containerId: any) =&gt; {
          const options = {hashAlgorithm: this.hashAlgorithm}; //передается в CREATEPKCS10
          this.plugin.createPkcs10(this.token.id, containerId, subject, extensions, options)
            .then((csr: string) =&gt; {
...
            })
            .then(undefined, (err: { error: string, message: string }) =&gt; {
// Reject в этом месте
...
            });
        })
        .then(undefined, (err: { error: string, message: string }) =&gt; {...});
    });</code></pre></div></blockquote></div><p>Покажите, пожалуйста, параметры options которые вы передаете в функции generateKeyPair и createPkcs10.</p><p>Сверьте их поля с <a href="https://dev.rutoken.ru/download/attachments/57147607/jsdoc.zip?version=1&amp;modificationDate=1559829463000&amp;api=v2">документацией на API Рутокен Плагина 4.4.1.</a></p></blockquote></div></blockquote></div><p>В версии 4.4.1 обработка входных параметров могла стать более строгой.</p><p>Сделайте, пожалуйста, дамп всех параметров передающихся в функию createPkcs10.</p>]]></description>
			<author><![CDATA[null@example.com (Павел Анфимов)]]></author>
			<pubDate>Thu, 03 Oct 2019 08:45:33 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/13342/#p13342</guid>
		</item>
		<item>
			<title><![CDATA[Re: Rutoken 4.4.1 (mac) vs 4.0.1 (windows)]]></title>
			<link>https://forum.rutoken.ru/post/13341/#p13341</link>
			<description><![CDATA[<p>я немного сократил код, параметры обозначил.<br />суть то в том, что на windows 4.0.1 работает, на mac 4.4.1 не работает. <br /></p><div class="quotebox"><cite>Павел Анфимов пишет:</cite><blockquote><div class="quotebox"><cite>mihail910 пишет:</cite><blockquote><div class="codebox"><pre><code>    return await new Promise((resolve, reject) =&gt; {
      console.log(options); // {paramset: &quot;A&quot;, publicKeyAlgorithm: 4, signatureSize: 1024 } ПЕРЕДАЕТСЯ В GENERATEKEYPAIR
      this.plugin.generateKeyPair(this.token.id, &#039;A&#039;, containerName, options)
        .then((containerId: any) =&gt; {
          const options = {hashAlgorithm: this.hashAlgorithm}; //передается в CREATEPKCS10
          this.plugin.createPkcs10(this.token.id, containerId, subject, extensions, options)
            .then((csr: string) =&gt; {
...
            })
            .then(undefined, (err: { error: string, message: string }) =&gt; {
// Reject в этом месте
...
            });
        })
        .then(undefined, (err: { error: string, message: string }) =&gt; {...});
    });</code></pre></div></blockquote></div><p>Покажите, пожалуйста, параметры options которые вы передаете в функции generateKeyPair и createPkcs10.</p><p>Сверьте их поля с <a href="https://dev.rutoken.ru/download/attachments/57147607/jsdoc.zip?version=1&amp;modificationDate=1559829463000&amp;api=v2">документацией на API Рутокен Плагина 4.4.1.</a></p></blockquote></div>]]></description>
			<author><![CDATA[null@example.com (mihail910)]]></author>
			<pubDate>Thu, 03 Oct 2019 08:38:14 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/13341/#p13341</guid>
		</item>
		<item>
			<title><![CDATA[Re: Rutoken 4.4.1 (mac) vs 4.0.1 (windows)]]></title>
			<link>https://forum.rutoken.ru/post/13340/#p13340</link>
			<description><![CDATA[<div class="quotebox"><cite>mihail910 пишет:</cite><blockquote><div class="codebox"><pre><code>    return await new Promise((resolve, reject) =&gt; {
      console.log(this.token.id); // 0
      console.log(containerName); // klient:_3240441_1570021724430
      console.log(options); // {paramset: &quot;A&quot;, publicKeyAlgorithm: 4, signatureSize: 1024 }



      this.plugin.generateKeyPair(this.token.id, &#039;A&#039;, containerName, options)
        .then((containerId: any) =&gt; {
          const options = {hashAlgorithm: this.hashAlgorithm};
          console.log(containerId); // 58:19:37:a2:04:f7:31:14:46:89 .... 
          console.log(subject); // массив подобных элементов  {rdn: &quot;commonName&quot;, value: &quot;Клиент: 3240441&quot;}
          console.log(extensions); // {}



          this.plugin.createPkcs10(this.token.id, containerId, subject, extensions, options)
            .then((csr: string) =&gt; {

              const result = csr
                .replace(&#039;-----BEGIN CERTIFICATE REQUEST-----\n&#039;, &#039;&#039;)
                .replace(&#039;\n-----END CERTIFICATE REQUEST-----&#039;, &#039;&#039;);

              resolve(result);
              this.processing = false;
            })
            .then(undefined, (err: { error: string, message: string }) =&gt; {
// Reject в этом месте
              reject({
                errorCode: +err.message,
                errorText: this.getErrorByCode(+err.message)
              });
              this.processing = false;
            });
        })
        .then(undefined, (err: { error: string, message: string }) =&gt; {
          reject({
            errorCode: +err.message,
            errorText: this.getErrorByCode(+err.message)
          });
          this.processing = false;
        });
    });</code></pre></div></blockquote></div><p>Покажите, пожалуйста, параметры options которые вы передаете в функции generateKeyPair и createPkcs10.</p><p>Сверьте их поля с <a href="https://dev.rutoken.ru/download/attachments/57147607/jsdoc.zip?version=1&amp;modificationDate=1559829463000&amp;api=v2">документацией на API Рутокен Плагина 4.4.1.</a></p>]]></description>
			<author><![CDATA[null@example.com (Павел Анфимов)]]></author>
			<pubDate>Thu, 03 Oct 2019 07:52:03 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/13340/#p13340</guid>
		</item>
		<item>
			<title><![CDATA[Re: Rutoken 4.4.1 (mac) vs 4.0.1 (windows)]]></title>
			<link>https://forum.rutoken.ru/post/13339/#p13339</link>
			<description><![CDATA[<div class="codebox"><pre><code>    return await new Promise((resolve, reject) =&gt; {
      console.log(this.token.id); // 0
      console.log(containerName); // klient:_3240441_1570021724430
      console.log(options); // {paramset: &quot;A&quot;, publicKeyAlgorithm: 4, signatureSize: 1024 }



      this.plugin.generateKeyPair(this.token.id, &#039;A&#039;, containerName, options)
        .then((containerId: any) =&gt; {
          const options = {hashAlgorithm: this.hashAlgorithm};
          console.log(containerId); // 58:19:37:a2:04:f7:31:14:46:89 .... 
          console.log(subject); // массив подобных элементов  {rdn: &quot;commonName&quot;, value: &quot;Клиент: 3240441&quot;}
          console.log(extensions); // {}



          this.plugin.createPkcs10(this.token.id, containerId, subject, extensions, options)
            .then((csr: string) =&gt; {

              const result = csr
                .replace(&#039;-----BEGIN CERTIFICATE REQUEST-----\n&#039;, &#039;&#039;)
                .replace(&#039;\n-----END CERTIFICATE REQUEST-----&#039;, &#039;&#039;);

              resolve(result);
              this.processing = false;
            })
            .then(undefined, (err: { error: string, message: string }) =&gt; {
// Reject в этом месте
              reject({
                errorCode: +err.message,
                errorText: this.getErrorByCode(+err.message)
              });
              this.processing = false;
            });
        })
        .then(undefined, (err: { error: string, message: string }) =&gt; {
          reject({
            errorCode: +err.message,
            errorText: this.getErrorByCode(+err.message)
          });
          this.processing = false;
        });
    });</code></pre></div><div class="quotebox"><cite>Алексей Лазарев пишет:</cite><blockquote><p>Добрый день, а можете показать кусок кода с вызовом generateKeyPair?</p></blockquote></div>]]></description>
			<author><![CDATA[null@example.com (mihail910)]]></author>
			<pubDate>Wed, 02 Oct 2019 13:12:47 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/13339/#p13339</guid>
		</item>
		<item>
			<title><![CDATA[Re: Rutoken 4.4.1 (mac) vs 4.0.1 (windows)]]></title>
			<link>https://forum.rutoken.ru/post/13338/#p13338</link>
			<description><![CDATA[<p>Добрый день, а можете показать кусок кода с вызовом generateKeyPair?</p>]]></description>
			<author><![CDATA[null@example.com (Алексей Лазарев)]]></author>
			<pubDate>Wed, 02 Oct 2019 13:00:44 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/13338/#p13338</guid>
		</item>
		<item>
			<title><![CDATA[Rutoken 4.4.1 (mac) vs 4.0.1 (windows)]]></title>
			<link>https://forum.rutoken.ru/post/13336/#p13336</link>
			<description><![CDATA[<p>Добрый день.</p><p>Хотелось бы понять разницу между этими версиями. В проекте используется ( web/angular2 ).</p><p>Я был вынужден поставить последнюю 4.4.1 на сегодняшний день версию плагина.</p><p>По коду вижу вызов generateKeyPair и в его then (Promise resolve) вызов createPkcs10. В этом месте вываливается ошибка</p><p>{errorCode: 2, errorText: &quot;BAD_PARAMS&quot;}</p><br /><p>В чем может быть дело, если на версии плагина 4.0.1 windows нет проблемы, на macOs(10.14) 4.4.1 ошибка не дает работать?</p><p>Найти и заглянуть в реализацию createPkcs10 не удалось, посколько просто не удалось найти исходник.</p>]]></description>
			<author><![CDATA[null@example.com (mihail910)]]></author>
			<pubDate>Wed, 02 Oct 2019 12:07:10 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/13336/#p13336</guid>
		</item>
	</channel>
</rss>
