{"id":320830,"date":"2021-04-04T21:00:41","date_gmt":"2021-04-04T21:00:41","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=320830"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=320830","title":{"rendered":"\u042d\u0426\u041f \u043f\u043e \u0413\u041e\u0421\u0422 \u043d\u0430 GNU\/Linux \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e OpenSSL"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u041f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u043a\u0430\u043a-\u0442\u043e \u0440\u0430\u0437 \u0441\u0440\u043e\u0447\u043d\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0430\u0436\u043d\u044b\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u0430\u0433\u0435\u043d\u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0443\u043c\u0430\u0433\u0435 \u0441 \u043d\u043e\u0442\u0430\u0440\u0438\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u044c\u044e \u0438\u043b\u0438 \u0432\u0435\u0440\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u042d\u0426\u041f. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0436\u0435 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0438 \u0434\u0435\u043d\u044c\u0433\u0438 \u0438 \u043f\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u0443 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u043f\u0440\u043e\u043f\u0440\u0438\u0435\u0442\u0430\u0440\u043d\u044b\u0445 \u0438 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439.<\/p>\n<p>\u0423\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u044f\u044e\u0449\u0438\u0439 \u0426\u0435\u043d\u0442\u0440 \u0432\u044b\u0434\u0430\u043b \u043d\u0430\u043c \u043a\u043b\u044e\u0447 \u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0432 \u043e\u0434\u043d\u043e\u043c PKCS#12 \u0444\u0430\u0439\u043b\u0435 <strong>auth.p12<br \/><\/strong>\u042f \u0438\u0441\u0445\u043e\u0436\u0443 \u0438\u0437 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0432 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0435\u0441\u0442\u044c linux \u0438 docker. \u041c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u043d\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e &#8212; \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043a\u0438\u043d\u0443\u0442\u044c \u043d\u0430\u0448 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043a\u0443\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u043d\u0430 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043f\u043e SSH. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 docker \u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u043e\u043a\u0435\u0440-\u043e\u0431\u0440\u0430\u0437\u0430\u043c\u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u044d\u0442\u043e\u0439 \u0437\u0430\u043c\u0435\u0442\u043a\u0438.  \u041f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u0441\u0440\u0430\u0437\u0443 \u043a \u0434\u0435\u043b\u0443:<\/p>\n<p>\u041f\u0440\u044f\u043c\u043e \u0438\u0437 \u043f\u0430\u043f\u043a\u0438, \u0433\u0434\u0435 \u043b\u0435\u0436\u0438\u0442 \u043d\u0430\u0448 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043d\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u044c (<strong>document.pdf<\/strong>) \u0438 PKCS#12 \u0444\u0430\u0439\u043b (auth.p12) \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 <a href=\"https:\/\/habr.com\/ru\/post\/353534\/\" rel=\"noopener noreferrer nofollow\">docker \u043e\u0431\u0440\u0430\u0437 OpenSSL \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0413\u041e\u0421\u0422<\/a> \u0438 \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440:<br \/><code>sudo docker run --rm -i -t -v pwd:pwd -w pwd rnix\/openssl-gost bash<br \/><\/code>\u0412\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u043c \u0438\u0437 PKCS#12 \u0444\u0430\u0439\u043b\u0430 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0435\u0433\u043e \u0432 pem-\u0444\u043e\u0440\u043c\u0430\u0442\u0435. \u041c\u043e\u0436\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u0432\u0435\u0441\u0442\u0438 \u0432\u0430\u0448 \u043f\u0430\u0440\u043e\u043b\u044c \u043e\u0442 PKCS#12 \u0444\u0430\u0439\u043b\u0430.<br \/><code>openssl pkcs12 -in auth.p12 -out key.pem -engine gost -nodes -clcerts<\/code><br \/>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0432\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u043c \u0438\u0437 PKCS#12 \u0444\u0430\u0439\u043b\u0430 \u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442.<br \/><code>openssl pkcs12 -in auth.p12 -clcerts -nokeys -out pub.crt<\/code><br \/>\u041f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442. \u041f\u043e\u0434\u043f\u0438\u0441\u044c \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u0430\u044f, \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 PKCS#7 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 (<strong>document.pdf.sig<\/strong>)<br \/><code>openssl smime -sign -signer pub.crt -inkey key.pem -engine gost -binary -noattr -outform DER -in document.pdf -out document.pdf.sig<\/code><br \/>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0433\u0434\u0435, \u043a\u0430\u043a \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0442\u0430\u043a \u0438 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 <a href=\"https:\/\/www.gosuslugi.ru\/pgu\/eds\/\" rel=\"noopener noreferrer nofollow\">\u0433\u043e\u0441\u0443\u0441\u043b\u0443\u0433<\/a>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440.<br \/>\u0412\u0441\u0451. \u041c\u043e\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u0430\u0433\u0435\u043d\u0442\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 sig \u0444\u0430\u0439\u043b.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0443 \u0432\u0430\u0441 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 DER (\u0432 Windows \u0447\u0430\u0441\u0442\u043e \u044d\u0442\u043e \u0444\u0430\u0439\u043b \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c .cer), \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0432 pem-\u0444\u043e\u0440\u043c\u0430\u0442:<br \/><code>openssl x509 -inform DER -in pub.cer -out pub.crt<\/code><\/p>\n<p>\u0424\u0430\u0439\u043b\u044b \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0432\u044b\u0448\u0435:<br \/>auth.p12 &#8212; \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 PFX-\u0444\u0430\u0439\u043b, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0438 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447<br \/>pub.crt &#8212; \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 (\u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447) \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 PEM<br \/>pub.cer &#8212; \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 (\u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447) \u0432 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 DER<br \/>key.pem &#8212; \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447<br \/>document.pdf &#8212; pdf-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u0442\u044c<br \/>document.pdf.sig &#8212; \u0444\u0430\u0439\u043b \u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0430 \u043e\u0442\u0441\u043e\u0435\u0434\u0438\u043d\u0451\u043d\u043d\u0430\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u043a \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0443    <\/p>\n<p>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0435\u043d\u0438\u044f:<br \/><a href=\"https:\/\/habr.com\/ru\/post\/187574\/\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 \u0440\u0435\u0435\u0441\u0442\u0440\u043e\u043c \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432<\/a><br \/><a href=\"https:\/\/habr.com\/ru\/company\/alfa\/blog\/341476\/\" rel=\"noopener noreferrer nofollow\">\u041d\u0435 \u0436\u0434\u0435\u043c, \u0430 \u0433\u043e\u0442\u043e\u0432\u0438\u043c\u0441\u044f \u043a \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0443 \u043d\u0430 \u043d\u043e\u0432\u044b\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u044b \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0437\u0430\u0449\u0438\u0442\u044b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438<\/a><br \/><a href=\"https:\/\/habr.com\/ru\/post\/353534\/\" rel=\"noopener noreferrer nofollow\">Docker-\u043e\u0431\u0440\u0430\u0437\u044b \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0413\u041e\u0421\u0422-\u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u0432 openssl, curl, php, nginx<\/a><br \/><a href=\"https:\/\/habr.com\/ru\/post\/61670\/\" rel=\"noopener noreferrer nofollow\">OpenSSL: \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c<\/a><br \/><a href=\"https:\/\/stackoverflow.com\/questions\/52980370\/how-to-convert-p12-to-crt-file\" rel=\"noopener noreferrer nofollow\">https:\/\/stackoverflow.com\/questions\/52980370\/how-to-convert-p12-to-crt-file<\/a><br \/><a href=\"https:\/\/www.emaro-ssl.ru\/blog\/convert-ssl-certificate-formats\/\" rel=\"noopener noreferrer nofollow\">https:\/\/www.emaro-ssl.ru\/blog\/convert-ssl-certificate-formats\/<\/a><br \/><a href=\"https:\/\/qna.habr.com\/q\/213942\" rel=\"noopener noreferrer nofollow\">https:\/\/qna.habr.com\/q\/213942<\/a><br \/><a href=\"http:\/\/rodji.net\/blog\/2013\/12\/27\/openssl-%D0%BF%D0%BE-%D0%B3%D0%BE%D1%81%D1%82-%D0%BF%D0%BE%D0%B4%D0%BF%D0%B8%D1%81%D1%8B%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5-%D1%88%D0%B8%D1%84%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5-%D0%BF%D1%80\/\" rel=\"noopener noreferrer nofollow\">http:\/\/rodji.net\/blog\/2013\/12\/27\/openssl-\u043f\u043e-\u0433\u043e\u0441\u0442-\u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u043d\u0438\u0435-\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435-\u043f\u0440\/<\/a><br \/><a href=\"https:\/\/polikarpoff.ru\/all\/eksport-ecp-v-formate-pkcs-12\/\" rel=\"noopener noreferrer nofollow\">https:\/\/polikarpoff.ru\/all\/eksport-ecp-v-formate-pkcs-12\/<\/a><\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/550664\/\"> https:\/\/habr.com\/ru\/post\/550664\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u041f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u043a\u0430\u043a-\u0442\u043e \u0440\u0430\u0437 \u0441\u0440\u043e\u0447\u043d\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0430\u0436\u043d\u044b\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u0430\u0433\u0435\u043d\u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0443\u043c\u0430\u0433\u0435 \u0441 \u043d\u043e\u0442\u0430\u0440\u0438\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u044c\u044e \u0438\u043b\u0438 \u0432\u0435\u0440\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u042d\u0426\u041f. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0436\u0435 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0438 \u0434\u0435\u043d\u044c\u0433\u0438 \u0438 \u043f\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u0443 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u043f\u0440\u043e\u043f\u0440\u0438\u0435\u0442\u0430\u0440\u043d\u044b\u0445 \u0438 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439.<\/p>\n<p>\u0423\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u044f\u044e\u0449\u0438\u0439 \u0426\u0435\u043d\u0442\u0440 \u0432\u044b\u0434\u0430\u043b \u043d\u0430\u043c \u043a\u043b\u044e\u0447 \u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0432 \u043e\u0434\u043d\u043e\u043c PKCS#12 \u0444\u0430\u0439\u043b\u0435 <strong>auth.p12<br \/><\/strong>\u042f \u0438\u0441\u0445\u043e\u0436\u0443 \u0438\u0437 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0432 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0435\u0441\u0442\u044c linux \u0438 docker. \u041c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u043d\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e &#8212; \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043a\u0438\u043d\u0443\u0442\u044c \u043d\u0430\u0448 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043a\u0443\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u043d\u0430 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043f\u043e SSH. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 docker \u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u043e\u043a\u0435\u0440-\u043e\u0431\u0440\u0430\u0437\u0430\u043c\u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u044d\u0442\u043e\u0439 \u0437\u0430\u043c\u0435\u0442\u043a\u0438.  \u041f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u0441\u0440\u0430\u0437\u0443 \u043a \u0434\u0435\u043b\u0443:<\/p>\n<p>\u041f\u0440\u044f\u043c\u043e \u0438\u0437 \u043f\u0430\u043f\u043a\u0438, \u0433\u0434\u0435 \u043b\u0435\u0436\u0438\u0442 \u043d\u0430\u0448 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043d\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u044c (<strong>document.pdf<\/strong>) \u0438 PKCS#12 \u0444\u0430\u0439\u043b (auth.p12) \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 <a href=\"https:\/\/habr.com\/ru\/post\/353534\/\" rel=\"noopener noreferrer nofollow\">docker \u043e\u0431\u0440\u0430\u0437 OpenSSL \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0413\u041e\u0421\u0422<\/a> \u0438 \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440:<br \/><code>sudo docker run --rm -i -t -v pwd:pwd -w pwd rnix\/openssl-gost bash<br \/><\/code>\u0412\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u043c \u0438\u0437 PKCS#12 \u0444\u0430\u0439\u043b\u0430 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0435\u0433\u043e \u0432 pem-\u0444\u043e\u0440\u043c\u0430\u0442\u0435. \u041c\u043e\u0436\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u0432\u0435\u0441\u0442\u0438 \u0432\u0430\u0448 \u043f\u0430\u0440\u043e\u043b\u044c \u043e\u0442 PKCS#12 \u0444\u0430\u0439\u043b\u0430.<br \/><code>openssl pkcs12 -in auth.p12 -out key.pem -engine gost -nodes -clcerts<\/code><br \/>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0432\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0435\u043c \u0438\u0437 PKCS#12 \u0444\u0430\u0439\u043b\u0430 \u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442.<br \/><code>openssl pkcs12 -in auth.p12 -clcerts -nokeys -out pub.crt<\/code><br \/>\u041f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442. \u041f\u043e\u0434\u043f\u0438\u0441\u044c \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u043d\u0430\u044f, \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 PKCS#7 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 (<strong>document.pdf.sig<\/strong>)<br \/><code>openssl smime -sign -signer pub.crt -inkey key.pem -engine gost -binary -noattr -outform DER -in document.pdf -out document.pdf.sig<\/code><br \/>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0433\u0434\u0435, \u043a\u0430\u043a \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0442\u0430\u043a \u0438 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 <a href=\"https:\/\/www.gosuslugi.ru\/pgu\/eds\/\" rel=\"noopener noreferrer nofollow\">\u0433\u043e\u0441\u0443\u0441\u043b\u0443\u0433<\/a>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440.<br \/>\u0412\u0441\u0451. \u041c\u043e\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u0430\u0433\u0435\u043d\u0442\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 sig \u0444\u0430\u0439\u043b.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0443 \u0432\u0430\u0441 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 DER (\u0432 Windows \u0447\u0430\u0441\u0442\u043e \u044d\u0442\u043e \u0444\u0430\u0439\u043b \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c .cer), \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0432 pem-\u0444\u043e\u0440\u043c\u0430\u0442:<br \/><code>openssl x509 -inform DER -in pub.cer -out pub.crt<\/code><\/p>\n<p>\u0424\u0430\u0439\u043b\u044b \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0432\u044b\u0448\u0435:<br \/>auth.p12 &#8212; \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 PFX-\u0444\u0430\u0439\u043b, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0438 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447<br \/>pub.crt &#8212; \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 (\u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447) \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 PEM<br \/>pub.cer &#8212; \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 (\u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447) \u0432 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 DER<br \/>key.pem &#8212; \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447<br \/>document.pdf &#8212; pdf-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u0442\u044c<br \/>document.pdf.sig &#8212; \u0444\u0430\u0439\u043b \u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0430 \u043e\u0442\u0441\u043e\u0435\u0434\u0438\u043d\u0451\u043d\u043d\u0430\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u043a \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0443    <\/p>\n<p>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0435\u043d\u0438\u044f:<br \/><a href=\"https:\/\/habr.com\/ru\/post\/187574\/\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 \u0440\u0435\u0435\u0441\u0442\u0440\u043e\u043c \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432<\/a><br \/><a href=\"https:\/\/habr.com\/ru\/company\/alfa\/blog\/341476\/\" rel=\"noopener noreferrer nofollow\">\u041d\u0435 \u0436\u0434\u0435\u043c, \u0430 \u0433\u043e\u0442\u043e\u0432\u0438\u043c\u0441\u044f \u043a \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0443 \u043d\u0430 \u043d\u043e\u0432\u044b\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u044b \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0437\u0430\u0449\u0438\u0442\u044b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438<\/a><br \/><a href=\"https:\/\/habr.com\/ru\/post\/353534\/\" rel=\"noopener noreferrer nofollow\">Docker-\u043e\u0431\u0440\u0430\u0437\u044b \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0413\u041e\u0421\u0422-\u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0432 \u0432 openssl, curl, php, nginx<\/a><br \/><a href=\"https:\/\/habr.com\/ru\/post\/61670\/\" rel=\"noopener noreferrer nofollow\">OpenSSL: \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c<\/a><br \/><a href=\"https:\/\/stackoverflow.com\/questions\/52980370\/how-to-convert-p12-to-crt-file\" rel=\"noopener noreferrer nofollow\">https:\/\/stackoverflow.com\/questions\/52980370\/how-to-convert-p12-to-crt-file<\/a><br \/><a href=\"https:\/\/www.emaro-ssl.ru\/blog\/convert-ssl-certificate-formats\/\" rel=\"noopener noreferrer nofollow\">https:\/\/www.emaro-ssl.ru\/blog\/convert-ssl-certificate-formats\/<\/a><br \/><a href=\"https:\/\/qna.habr.com\/q\/213942\" rel=\"noopener noreferrer nofollow\">https:\/\/qna.habr.com\/q\/213942<\/a><br \/><a href=\"http:\/\/rodji.net\/blog\/2013\/12\/27\/openssl-%D0%BF%D0%BE-%D0%B3%D0%BE%D1%81%D1%82-%D0%BF%D0%BE%D0%B4%D0%BF%D0%B8%D1%81%D1%8B%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5-%D1%88%D0%B8%D1%84%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5-%D0%BF%D1%80\/\" rel=\"noopener noreferrer nofollow\">http:\/\/rodji.net\/blog\/2013\/12\/27\/openssl-\u043f\u043e-\u0433\u043e\u0441\u0442-\u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u043d\u0438\u0435-\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435-\u043f\u0440\/<\/a><br \/><a href=\"https:\/\/polikarpoff.ru\/all\/eksport-ecp-v-formate-pkcs-12\/\" rel=\"noopener noreferrer nofollow\">https:\/\/polikarpoff.ru\/all\/eksport-ecp-v-formate-pkcs-12\/<\/a><\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/550664\/\"> https:\/\/habr.com\/ru\/post\/550664\/<\/a><br \/><\/br><\/br><\/br><\/br><\/br><\/br><\/br><\/br><\/br><\/p>\n<p><\/br><\/br><\/br><\/br><\/br><\/p>\n<\/p>\n<p><\/br><\/br><\/br><\/br><\/br><\/br><\/code><\/br><\/p>\n<\/p>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-320830","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/320830","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=320830"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/320830\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=320830"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=320830"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=320830"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}