{"id":19,"date":"2023-01-17T04:07:47","date_gmt":"2023-01-17T04:07:47","guid":{"rendered":"https:\/\/smartsource.com.sg\/blog\/?p=19"},"modified":"2023-01-17T04:07:47","modified_gmt":"2023-01-17T04:07:47","slug":"export-ssl-cert-from-windows-and-import-to-linux","status":"publish","type":"post","link":"https:\/\/smartsource.com.sg\/blog\/index.php\/2023\/01\/17\/export-ssl-cert-from-windows-and-import-to-linux\/","title":{"rendered":"Export ssl cert from windows and import to linux"},"content":{"rendered":"\n<p>Step 1: Export the cert in Windows machine<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Click Start, Run, then type \u201cmmc\u201d and hit enter.<\/li>\n\n\n\n<li>In the leftmost menu, choose \u201cAdd\/Remove Snap In\u201d.<\/li>\n\n\n\n<li>Click \u201cAdd\u201d, then click \u201cCertificates\u201d, then OK.<\/li>\n\n\n\n<li>When the wizard starts, choose \u201cComputer Account\u201d, \u201cLocal Computer\u201d and finish out the wizard.<\/li>\n\n\n\n<li>Once you\u2019re finished, get back to the MMC and expand the \u201cCertificates\u201d node, then the \u201cPersonal\u201d node.<\/li>\n\n\n\n<li>Click on the \u201cCertificates\u201d node under \u201cPersonal\u201d and find your certificate in the right pane.<\/li>\n\n\n\n<li>Right click on the certificate and choose \u201cAll Tasks\u201d, then \u201cExport\u201d.<\/li>\n\n\n\n<li>When the wizard starts, choose \u201cYes\u201d for exporting the private key, then select ONLY \u201cStrong Private Key Protection\u201d from the PFX section. You will also need to set a password and specify a location for the PFX file.<\/li>\n\n\n\n<li>Once the PFX file has been saved, close out the MMC (don\u2019t save the snap-in if it asks).<\/li>\n\n\n\n<li>Copy the PFX over to the Linux server via FTP.<\/li>\n<\/ul>\n\n\n\n<p>Step 2: Convert pfx and get private key and cert separately.<\/p>\n\n\n\n<p>Assuming the filename that you copied from your windows machine is certificate.pfx and you have already copied the file over to your linux machine, run the below commands in your linux machine<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>openssl pkcs12 -in certificate.pfx -out temp.pem<\/li>\n\n\n\n<li>Open the file in a text editor and copy the private key and certificate to different files (private.key certificate.crt respectively).<\/li>\n\n\n\n<li>openssl rsa -in private.key -out private.key<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Step 1: Export the cert in Windows machine Step 2: Convert pfx and get private key and cert separately. Assuming the filename that you copied from your windows machine is&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[8,18,15,17],"class_list":["post-19","post","type-post","status-publish","format-standard","hentry","category-howtos","tag-linux","tag-pfx","tag-ssl","tag-windows"],"_links":{"self":[{"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/posts\/19","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=19"}],"version-history":[{"count":1,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/posts\/19\/revisions"}],"predecessor-version":[{"id":20,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/posts\/19\/revisions\/20"}],"wp:attachment":[{"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=19"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=19"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}