{"id":3340,"date":"2023-02-21T16:15:28","date_gmt":"2023-02-21T22:15:28","guid":{"rendered":"https:\/\/microsoftgeek.com\/?p=3340"},"modified":"2023-02-21T16:21:43","modified_gmt":"2023-02-21T22:21:43","slug":"converting-pfx-file-to-pem-file-using-openssl-in-windows-10","status":"publish","type":"post","link":"https:\/\/microsoftgeek.com\/?p=3340","title":{"rendered":"Converting PFX File to PEM file using OpenSSL in Windows 10"},"content":{"rendered":"\n<p>Converting PFX File to .Pem file using OpenSSL in Windows 10 .<\/p>\n\n\n\n<p>Windows 10 \u2013 Version 1607 or Above \u2013<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.azure365pro.com\/wp-content\/uploads\/2016\/08\/image_thumb-41.png\" alt=\"image\" title=\"image\"\/><\/figure>\n\n\n\n<p>Some Application never allow .pfx file to import directly. Running Ubuntu Bash shell become much simpler in Windows 10<\/p>\n\n\n\n<p>In Windows 10 you can have a linux subsystem . It\u2019s a great feature for sys admins for these sort of tasks.<\/p>\n\n\n\n<p>Start \u2013 Run \u2013 Appwiz.cpl \u2013 Turn Windows Features on or off.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.azure365pro.com\/wp-content\/uploads\/2016\/08\/image_thumb-42.png\" alt=\"image\" title=\"image\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.azure365pro.com\/wp-content\/uploads\/2016\/08\/image_thumb-43.png\" alt=\"image\" title=\"image\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.azure365pro.com\/wp-content\/uploads\/2016\/08\/image_thumb-44.png\" alt=\"image\" title=\"image\"\/><\/figure>\n\n\n\n<p><strong>Note : All Commands and Directory Names are Case Sensitive<\/strong><\/p>\n\n\n\n<p><strong>List the Drives you can mount \u2013<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>cd \/mnt\/<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Press TAB to list the Drives.&nbsp; Mounting F Drive.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>cd \/mnt\/f<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.azure365pro.com\/wp-content\/uploads\/2016\/08\/image_thumb-45.png\" alt=\"image\" title=\"image\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.azure365pro.com\/wp-content\/uploads\/2016\/08\/image_thumb-46.png\" alt=\"image\" title=\"image\"\/><\/figure>\n\n\n\n<p><strong>Change Directories get inside c:\\cert \u2013<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>cd \/mnt\/f\/cert\/<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>List Directories \u2013<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.azure365pro.com\/wp-content\/uploads\/2016\/08\/image_thumb-47.png\" alt=\"image\" title=\"image\"\/><\/figure>\n\n\n\n<p><strong>To Export private key from the Pfx File and Make .PEM file \u2013<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>openssl pkcs12 -in mycert.pfx -nocerts -out key.pem -nodes<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.azure365pro.com\/wp-content\/uploads\/2016\/08\/image_thumb-48.png\" alt=\"image\" title=\"image\"\/><\/figure>\n\n\n\n<p><strong>To Export Certificate from the Pfx file to .PEM file \u2013<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>openssl pkcs12 -in mycert.pfx -nokeys -out cert.pem<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.azure365pro.com\/wp-content\/uploads\/2016\/08\/image_thumb-49.png\" alt=\"image\" title=\"image\"\/><\/figure>\n\n\n\n<p><strong>Remove the Passphrase from Key.Pem File (Optional) \u2013<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>openssl rsa -in key.pem -out server.key<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.azure365pro.com\/wp-content\/uploads\/2016\/08\/image_thumb-50.png\" alt=\"image\" title=\"image\"\/><\/figure>\n\n\n\n<p><strong>To Export to .crt<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>openssl pkcs12 -in mycert.pfx -clcerts -nokeys -out mycert.crt<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.azure365pro.com\/wp-content\/uploads\/2016\/08\/CRT.png\" alt=\"\" class=\"wp-image-8932\"\/><\/figure>\n\n\n\n<p><strong>Remove the Passphrase from Key.Pem File (Optional) \u2013<\/strong><\/p>\n\n\n\n<p><strong>You can see below files&nbsp; \u2013<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.azure365pro.com\/wp-content\/uploads\/2016\/08\/example.png\" alt=\"\" class=\"wp-image-8933\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Converting PFX File to .Pem file using OpenSSL in Windows 10 . Windows 10 \u2013 Version 1607 or Above \u2013 Some Application never allow .pfx file to import directly. Running Ubuntu Bash shell become much simpler in Windows 10 In Windows 10 you can have a linux subsystem . It\u2019s a great feature for sys [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[59,66,72],"tags":[],"class_list":["post-3340","post","type-post","status-publish","format-standard","hentry","category-powershell","category-windows-10win10","category-windows-os-client-os"],"_links":{"self":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/3340","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3340"}],"version-history":[{"count":4,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/3340\/revisions"}],"predecessor-version":[{"id":3344,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/3340\/revisions\/3344"}],"wp:attachment":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3340"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}