<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Форум Рутокен &mdash; Запрос на выпуск сертификата в формате RFC2797]]></title>
		<link>https://forum.rutoken.ru/topic/3138/</link>
		<atom:link href="https://forum.rutoken.ru/feed/rss/topic/3138" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «Запрос на выпуск сертификата в формате RFC2797».]]></description>
		<lastBuildDate>Mon, 16 Mar 2020 15:22:32 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Запрос на выпуск сертификата в формате RFC2797]]></title>
			<link>https://forum.rutoken.ru/post/13998/#p13998</link>
			<description><![CDATA[<p><strong>amarinskikh</strong>, ответили вам эл. почту.</p>]]></description>
			<author><![CDATA[null@example.com (Павел Анфимов)]]></author>
			<pubDate>Mon, 16 Mar 2020 15:22:32 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/13998/#p13998</guid>
		</item>
		<item>
			<title><![CDATA[Запрос на выпуск сертификата в формате RFC2797]]></title>
			<link>https://forum.rutoken.ru/post/13997/#p13997</link>
			<description><![CDATA[<p>Мы используем, Рутокен ЭЦП 2.0 и Рутокен Плагин версии 4.5.0 + Модуль для Рутокен плагин версии 1.0.8 для интеграции в веб приложение.</p><p>Возникла проблема формат сгенерированого запроса на перевыпуск сертификата - он не соответствует требованиям УЦ.<br />УЦ требует чтобы запрос на перевыпуск сертификата был подписан ранее выпущенным сертификатом и был в формате RFC2797.<br />Генерируем запрос мы следующим образом</p><p>async function generateCSR(deviceId, oldCertId) {</p><p>&nbsp; &nbsp; const keyPairOptions = {<br />&nbsp; &nbsp; &nbsp; &nbsp; paramset: &quot;A&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp; signatureSize: 512,<br />&nbsp; &nbsp; &nbsp; &nbsp; publicKeyAlgorithm: 2<br />&nbsp; &nbsp; };<br />&nbsp; &nbsp; const keypairId = await plugin.generateKeyPair(deviceId, null, null, keyPairOptions);</p><p>&nbsp; &nbsp; const generateCSROptions =&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br />&nbsp; &nbsp; &nbsp; &nbsp; hashAlgorithm: 2,<br />&nbsp; &nbsp; &nbsp; &nbsp; customExtensions: [],<br />&nbsp; &nbsp; &nbsp; &nbsp; subjectSignTool: &quot;СКЗИ РУТОКЕН ЭЦП&quot;<br />&nbsp; &nbsp; };<br />&nbsp; &nbsp; const x509Subject = [<br />&nbsp; &nbsp; &nbsp; &nbsp; { rdn: &quot;&quot;, value: &quot;&quot; }<br />&nbsp; &nbsp; ];<br />&nbsp; &nbsp; const extentions = {<br />&nbsp; &nbsp; &nbsp; &nbsp; keyUsage: [],<br />&nbsp; &nbsp; &nbsp; &nbsp; extKeyUsage: [],<br />&nbsp; &nbsp; &nbsp; &nbsp; certificatePolicies: []<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; let pkcs10 = await plugin.createPkcs10(deviceId, keypairId, x509Subject, extentions, generateCSROptions);</p><p>&nbsp; &nbsp; pkcs10 = pkcs10.replace(/(\-+BEGIN CERTIFICATE REQUEST\-+(\r\n?|\n))|((\r\n?|\n)\-+END CERTIFICATE REQUEST\-+)/g, &#039;&#039;);<br />&nbsp; &nbsp; const signingOptions = {<br />&nbsp; &nbsp; &nbsp; &nbsp; addUserCertificate: true,<br />&nbsp; &nbsp; &nbsp; &nbsp; useHardwareHash: true,<br />&nbsp; &nbsp; &nbsp; &nbsp; addSignTime: true<br />&nbsp; &nbsp; };</p><p>&nbsp; &nbsp; const pkcs7 = await plugin.sign(deviceId, oldCertId, pkcs10, true, signingOptions)<br />&nbsp; &nbsp; return pkcs7;<br />}</p><br /><p>В требованиях УЦ указано, что contentType должен быть id-cct-PKIData. В запросе сгенерированном нами pkcs7-data <span class="postimg"><a class="fancybox fancybox.image" rel="group" href="https://forum.rutoken.ru/uploads/images/2020/03/0137cacb3a31842fd37f7deb37de0fc0.jpg"><img class="fb_img" src="https://forum.rutoken.ru/uploads/previews/2020/03/0137cacb3a31842fd37f7deb37de0fc0.jpg" alt="" /></a></span> <br /> В эталонном запросе, удовлетворяющем требованиям УЦ -&nbsp; id-cct-PKIData&nbsp; <span class="postimg"><a class="fancybox fancybox.image" rel="group" href="https://forum.rutoken.ru/uploads/images/2020/03/0fc0a7472928797d1a7710b61cc89553.jpg"><img class="fb_img" src="https://forum.rutoken.ru/uploads/previews/2020/03/0fc0a7472928797d1a7710b61cc89553.jpg" alt="" /></a></span> </p><br /><p>Просим вас помочь нам разобраться в процедуре генерации запроса, что стоит сделать чтобы достичь требований УЦ</p>]]></description>
			<author><![CDATA[null@example.com (amarinskikh)]]></author>
			<pubDate>Mon, 16 Mar 2020 11:31:34 +0000</pubDate>
			<guid>https://forum.rutoken.ru/post/13997/#p13997</guid>
		</item>
	</channel>
</rss>
