{"id":1304,"date":"2016-04-05T15:58:32","date_gmt":"2016-04-05T20:58:32","guid":{"rendered":"http:\/\/it.thelibrarie.com\/weblog\/?p=1304"},"modified":"2016-04-07T11:50:43","modified_gmt":"2016-04-07T16:50:43","slug":"webserver-ca-ssl-request-linux-windows","status":"publish","type":"post","link":"https:\/\/it.thelibrarie.com\/weblog\/2016\/04\/webserver-ca-ssl-request-linux-windows\/","title":{"rendered":"Webserver CA SSL Request, Linux Windows"},"content":{"rendered":"<p>I had a need to create a certificate for a new webserver. I have Linux machines available on my Windows dowmain that has a certificate authority advertised in active directory.<\/p>\n<p><strong>On your linux machine (that has openssl)<\/strong><br \/>\n<code>openssl req -new -sha256 -newkey rsa:2048 -nodes -keyout webserver1.key -out webserver1.csr<\/code><\/p>\n<blockquote><p>Generating a 2048 bit RSA private key<br \/>\n&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;+++<br \/>\n&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..+++<br \/>\nwriting new private key to &#8216;webserver1.key&#8217;<br \/>\n&#8212;&#8211;<br \/>\nYou are about to be asked to enter information that will be incorporated<br \/>\ninto your certificate request.<br \/>\nWhat you are about to enter is what is called a Distinguished Name or a DN.<br \/>\nThere are quite a few fields but you can leave some blank<br \/>\nFor some fields there will be a default value,<br \/>\nIf you enter &#8216;.&#8217;, the field will be left blank.<br \/>\n&#8212;&#8211;<br \/>\nCountry Name (2 letter code) [XX]:US<br \/>\nState or Province Name (full name) []:NO<br \/>\nLocality Name (eg, city) [Default City]:Town<br \/>\nOrganization Name (eg, company) [Default Company Ltd]:Winks<br \/>\nOrganizational Unit Name (eg, section) []:IT<br \/>\nCommon Name (eg, your name or your server&#8217;s hostname) []:webserver1.localdomain.local<br \/>\nEmail Address []:support@localdomain.local<\/p>\n<p>Please enter the following &#8216;extra&#8217; attributes<br \/>\nto be sent with your certificate request<br \/>\nA challenge password []:<br \/>\nAn optional company name []:<\/p><\/blockquote>\n<p><strong>Copy the CSR to your clipboard<\/strong><br \/>\n<code>nano webserver1.csr<\/code><br \/>\nCopy all of the text including the &#8220;&#8211;BEGIN&#8221; and &#8220;&#8211;END&#8221;<\/p>\n<p><strong>Create the certificate request on your CA<\/strong><\/p>\n<blockquote><p>https:\/\/certificateauthority\/certsrv<br \/>\nCreate a new request &#8211; Advanced certificate request<br \/>\nPaste the copied text<br \/>\nSelect webserver for the certificate template<br \/>\nSubmit<\/p><\/blockquote>\n<p>I always download as a base64 encoded certificate. I then copied the .cer to my linux box to run the next steps.<\/p>\n<p><strong>On your linux machine create the PFX<\/strong><br \/>\n<code>openssl pkcs12 -inkey webserver1.key -in webserver1.cer -export -out webserver1.pfx<\/code><\/p>\n<blockquote><p>Enter Export Password:<br \/>\nVerifying &#8211; Enter Export Password:<\/p><\/blockquote>\n<p>Copy the PFX back to your window machine, double click, enter the passcode, and away you go.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had a need to create a certificate for a new webserver. I have Linux machines available on my Windows dowmain that has a certificate authority advertised in active directory. On your linux machine (that has openssl) openssl req -new -sha256 -newkey rsa:2048 -nodes -keyout webserver1.key -out webserver1.csr Generating a 2048 bit RSA private key &hellip; <a href=\"https:\/\/it.thelibrarie.com\/weblog\/2016\/04\/webserver-ca-ssl-request-linux-windows\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Webserver CA SSL Request, Linux Windows<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,8],"tags":[],"class_list":["post-1304","post","type-post","status-publish","format-standard","hentry","category-linux","category-microsoft"],"_links":{"self":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/1304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/comments?post=1304"}],"version-history":[{"count":4,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/1304\/revisions"}],"predecessor-version":[{"id":1308,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/1304\/revisions\/1308"}],"wp:attachment":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/media?parent=1304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/categories?post=1304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/tags?post=1304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}