{"id":928,"date":"2021-04-09T14:05:00","date_gmt":"2021-04-09T19:05:00","guid":{"rendered":"https:\/\/itblog.ldlnet.net\/?p=928"},"modified":"2021-04-09T14:05:00","modified_gmt":"2021-04-09T19:05:00","slug":"renewing-your-godaddy-ssl-certificate-from-crt-cer-to-pfx-so-it-can-be-installed-on-iis","status":"publish","type":"post","link":"https:\/\/itblog.ldlnet.net\/index.php\/2021\/04\/09\/renewing-your-godaddy-ssl-certificate-from-crt-cer-to-pfx-so-it-can-be-installed-on-iis\/","title":{"rendered":"Renewing your GoDaddy SSL certificate from CRT\/CER to PFX so it can be installed on IIS"},"content":{"rendered":"\n<p>I always have issues getting my certificate renewed using OpenSSL and the certificates that GoDaddy lets you download. I chose IIS and I chose Exchange Server in the GoDaddy download section of the site to get the CRT file. The issue I always have is converting it to PFX so that I can install it with a private key on my IIS Server. This is also relevant if you are using Azure to host your certificates as Microsoft requires PFX certificates in that realm. <\/p>\n\n\n\n<p>So finally after I get it working today, I wanted to write this blog post to make sure I at least have a sure method to get the certificate converted with the private key. NOTE that this is for a certificate that has NOT expired. <\/p>\n\n\n\n<p>First, download your certificate from GoDaddy to the server you have OpenSSL installed on.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"653\" src=\"https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2021\/04\/image-1024x653.png\" alt=\"\" class=\"wp-image-929\" srcset=\"https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2021\/04\/image-1024x653.png 1024w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2021\/04\/image-300x191.png 300w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2021\/04\/image-768x490.png 768w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2021\/04\/image.png 1265w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Download the Certificate<\/figcaption><\/figure>\n\n\n\n<p>Next, extract the cert to your directory and note the path. You will use the path in your OpenSSL cmdlet.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"347\" src=\"https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2021\/04\/image-1-1024x347.png\" alt=\"\" class=\"wp-image-930\" srcset=\"https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2021\/04\/image-1-1024x347.png 1024w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2021\/04\/image-1-300x102.png 300w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2021\/04\/image-1-768x261.png 768w, https:\/\/itblog.ldlnet.net\/wp-content\/uploads\/2021\/04\/image-1.png 1126w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>You may be seeing other files in there. Well the issue was that I couldn&#8217;t generate the proper private key and the PEM file given by GoDaddy did not work in the conversion. So, here is what I had to do on the Web Server to export the proper private key:<\/p>\n\n\n\n<p>In the MMC Certificate Utility, export the current certificate with the private key:<\/p>\n\n\n\n<ul class=\"has-small-font-size wp-block-list\"><li><strong>Choose to Export the Key and Extended Properties<\/strong><\/li><li><strong>Choose a password and set the encryption to SHA256<\/strong><\/li><li><strong>Name the File and Export it to the directory you&#8217;re working from<\/strong><\/li><\/ul>\n\n\n\n<p>Next, run the following cmd in OpenSSL to extract the private key from the exported certificate. Enter the password you created during the export when prompted:<\/p>\n\n\n<pre class=\"lang:PowerShell nums:False\" title=\"Extract Private Key from PFX\">openssl pkcs12 -in c:\\path\\exportedwithpkey.pfx -nocerts -out c:\\path\\key.pem -nodes<\/pre>\n\n\n\n<p>Next, use that key file along with the CRT file to create the new PFX. Enter the password again when prompted:<\/p>\n\n\n<pre class=\"lang:PowerShell nums:False\" title=\"Create the new PFX file\">openssl pkcs12 -export -out c:\\path\\newldlnet2021.pfx -inkey c:\\path\\key.pem -in c:\\path\\ldlnet2021.crt<\/pre>\n\n\n\n<p> You should now have the proper NEW PFX file to import into IIS or Azure or where ever you need to the certificate installed with the private key! DON&#8217;T forget your password!<\/p>\n\n\n\n<h2 class=\"has-text-align-center wp-block-heading\">THANKS FOR READING!! KEEP LEARNING AND REMEBER TO DOCUMENT SO YOU DON&#8217;T HAVE TO REMEMBER ALL THE TIME!<\/h2>\n\n\n\n<p class=\"has-small-font-size\"><strong>REFERENCES:<\/strong><br><a href=\"https:\/\/wiki.cac.washington.edu\/display\/infra\/Extracting+Certificate+and+Private+Key+Files+from+a+.pfx+File#:~:text=%20Procedure%20%201%20Take%20the%20file%20you,pkcs12%20-in%20certname.pfx%20-nokeys%20-out%20cert.pem%20More%20\">Extracting Certificate and Private Key Files from a .pfx File &#8211; IAM &#8211; UW-IT Wiki (washington.edu)<\/a><br><a href=\"https:\/\/rlevchenko.com\/2020\/01\/28\/convert-a-certificate-to-pfx-godaddy-unable-to-load-private-key\/\">Convert a certificate to PFX (GoDaddy, unable to load private key) \u2013 UseIT | Roman Levchenko (rlevchenko.com)<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I always have issues getting my certificate renewed using OpenSSL and the certificates that GoDaddy lets you download. I chose IIS and<\/p>\n<p class=\"link-more\"><a class=\"myButt \" href=\"https:\/\/itblog.ldlnet.net\/index.php\/2021\/04\/09\/renewing-your-godaddy-ssl-certificate-from-crt-cer-to-pfx-so-it-can-be-installed-on-iis\/\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":877,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,2,3,1,16],"tags":[284,28,27,285,282,281,286,127],"class_list":["post-928","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-exchange","category-general","category-powershell","category-uncategorized","category-windows","tag-cer","tag-certificate","tag-certificates","tag-conversion","tag-openssl","tag-pfx","tag-private-key","tag-ssl","odd"],"_links":{"self":[{"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/posts\/928","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/comments?post=928"}],"version-history":[{"count":4,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/posts\/928\/revisions"}],"predecessor-version":[{"id":196104,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/posts\/928\/revisions\/196104"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/media\/877"}],"wp:attachment":[{"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/media?parent=928"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/categories?post=928"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itblog.ldlnet.net\/index.php\/wp-json\/wp\/v2\/tags?post=928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}