{"id":1185,"date":"2020-05-31T21:47:06","date_gmt":"2020-05-31T18:47:06","guid":{"rendered":"https:\/\/blog.5flor.ru\/?p=1185"},"modified":"2020-05-31T21:47:06","modified_gmt":"2020-05-31T18:47:06","slug":"%d0%ba%d0%be%d0%bd%d0%b2%d0%b5%d1%80%d1%82%d0%b0%d1%86%d0%b8%d1%8f-pfx-%d1%81%d0%b5%d1%80%d1%82%d0%b8%d1%84%d0%b8%d0%ba%d0%b0%d1%82%d0%b0-%d0%b2-pem","status":"publish","type":"post","link":"https:\/\/blog.5flor.ru\/?p=1185","title":{"rendered":"\u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f pfx \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u0432 pem"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">Conversion to a combined PEM file<\/h1>\n\n\n\n<p>To convert a PFX file to a PEM file that contains both the certificate and private key, the following command needs to be used:<br><code># openssl pkcs12 -in filename.pfx -out cert.pem -nodes<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Conversion to separate PEM files<\/h3>\n\n\n\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0432\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043a\u0430\u043a \u0440\u0430\u0437 \u043d\u0443\u0436\u0435\u043d \u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442, \u0438 \u043a\u043b\u044e\u0447. <\/p>\n\n\n\n<p>We can extract the private key form a PFX to a PEM file with this command:<br><code># openssl pkcs12 -in filename.pfx -nocerts -out key.pem<\/code><\/p>\n\n\n\n<p>Exporting the certificate only:<br><code># openssl pkcs12 -in filename.pfx -clcerts -nokeys -out cert.pem<\/code><\/p>\n\n\n\n<p>Removing the password from the extracted private key:<br><code># openssl rsa -in key.pem -out server.key<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Conversion to a combined PEM file To convert a PFX file to a PEM file that contains both the certificate and private key, the following command needs to be used:# openssl pkcs12 -in filename.pfx -out cert.pem -nodes Conversion to separate &hellip; <a href=\"https:\/\/blog.5flor.ru\/?p=1185\">\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,1,9],"tags":[],"class_list":["post-1185","post","type-post","status-publish","format-standard","hentry","category-apache","category-1","category-9"],"_links":{"self":[{"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=\/wp\/v2\/posts\/1185"}],"collection":[{"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1185"}],"version-history":[{"count":1,"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=\/wp\/v2\/posts\/1185\/revisions"}],"predecessor-version":[{"id":1186,"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=\/wp\/v2\/posts\/1185\/revisions\/1186"}],"wp:attachment":[{"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1185"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.5flor.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}