{"id":301,"date":"2010-06-05T01:17:18","date_gmt":"2010-06-05T07:17:18","guid":{"rendered":"http:\/\/blog.supportpro.com\/2010\/06\/ssl-certificate-installation-using-openssl\/"},"modified":"2018-10-04T06:52:46","modified_gmt":"2018-10-04T12:52:46","slug":"ssl-certificate-installation-using-openssl","status":"publish","type":"post","link":"https:\/\/www.supportpro.com\/blog\/ssl-certificate-installation-using-openssl\/","title":{"rendered":"SSL certificate installation using Openssl"},"content":{"rendered":"<p>In order to get a valid SSL certificate, you will need to generate a CSR that a certificate signing authority (such as Verisign or Thawte) will request. You have to determine the URL for the secured web site &#8211; this should be a Fully Qualified Domain Name (FQDN), i.e. if you want to access your secured website through https:\/\/www.example.com\/, then the FQDN of your website is www.example.com<br \/>\nSelect a few large and relatively random files on your server &#8211; compressed log files are a good start. These will act as your random seed enhancers. We refer to these as file1:file2:&#8230;:file5 below. Generate a key with the following command:<\/p>\n<p><!--more--><\/p>\n<p>$ openssl genrsa -des3 -out www.example.com.key 1024<br \/>\nThis will generate an 1024 bit RSA Private Key and store it in the www.example.key file. This command will also ask you for a pass phrase. Use something secure and remember it &#8211; you will need this pass phrase below. You will not be able to use the key or the certificate without the proper pass phrase.<br \/>\nGenerate the CSR with the following command:<br \/>\n$ openssl req -new -key www.example.com.key \\<br \/>\n-out www.example.com.csr<br \/>\nThis command will generated a CSR and store it in the www.example.com.csr file. This command will also prompt you for the X.509 attributes of your certificate. Remember to give the name FQDN when prompted for Common Name. The CSR should look something like this:<br \/>\n&#8212;&#8211;BEGIN CERTIFICATE REQUEST&#8212;&#8211;<br \/>\nMIIDRzCCArCgAwIBAgIDH\/IaMA0GCSqGSIb3DQEBBAUAMIHEMQswCQYDVQQGEwJa<br \/>\nQTEVMBMGA1UECBMMV2VzdGVybiBDYXBlMRIwEAYDVQQHEwlDYXBlIFRvd24xHTAb<br \/>\nBgNVBAoTFFRoYXd0ZSBDb25zdWx0aW5nIGNjMSgwJgYDVQQLEx9DZXJ0aWZpY2F0<br \/>\naW9uIFNlcnZpY2VzIERpdmlzaW9uMRkwFwYDVQQDExBUaGF3dGUgU2VydmVyIENB<br \/>\nMSYwJAYJKoZIhvcNAQkBFhdzZXJ2ZXItY2VydHNAdGhhd3RlLmNvbTAeFw0wNDA0<br \/>\nMzAyMjUwMzNaFw0wNTA1MTUwOTIxNTFaMGoxCzAJBgNVBAYTAlVTMRMwEQYDVQQI<br \/>\nEwpOZXcgSmVyc2V5MRMwEQYDVQQHEwpIYWNrZW5zYWNrMRcwFQYDVQQKEw5TdXJm<br \/>\nWHByZXNzIExMQzEYMBYGA1UEAxMPd3d3LnN<br \/>\n&#8212;&#8211;END CERTIFICATE REQUEST&#8212;&#8211;<br \/>\nYou can submit this CSR to any certificate signing authority.<\/p>\n<p>Installation<br \/>\nWhen you receive your SSL certificate from the certificate signing authority, name it www.example.com.crt and store it in \/home\/www.example.com\/ssl. Then, you need to insert the following in the Appache configuration file at \/etc\/httpd\/httpd.conf: (you need to become root to edit this file)<br \/>\nDocumentRoot \/path\/to\/website<br \/>\nSSLEngine on<br \/>\nSSLCertificateFile \/path\/to\/www.example.com.crt<br \/>\nSSLCertificateKeyFile \/path\/to\/www.example.com.de.key<br \/>\nWhere xxx.xxx.xxx.xxx is the IP address of the web site.<br \/>\nIn order to avoid having to supply the pass phrase everytime the web server restarts, do this:<br \/>\n$ openssl rsa -in www.example.com.key \\<br \/>\n-out www.example.com.de.key<br \/>\nLastly, restart the web server by:<br \/>\n# \/etc\/init.d\/httpd stop<br \/>\n# \/etc\/init.d\/httpd start<\/p>\n<p>If you require help, <a href=\"https:\/\/www.supportpro.com\/requestquote.php\">contact SupportPRO Server Admin<\/a><\/p>\n<p style=\"text-align: center;\"><!--HubSpot Call-to-Action Code --><span id=\"hs-cta-wrapper-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-wrapper\"><span id=\"hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-node hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\"><!-- [if lte IE 8]><\/p>\n\n\n\n\n\n<div id=\"hs-cta-ie-element\"><\/div>\n\n\n<![endif]--><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/2725694\/9d590242-d641-4383-94b4-8cfd62f0af6b\"><img decoding=\"async\" id=\"hs-cta-img-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-img\" style=\"border-width: 0px;\" src=\"https:\/\/no-cache.hubspot.com\/cta\/default\/2725694\/9d590242-d641-4383-94b4-8cfd62f0af6b.png\" alt=\"Server not running properly? Get A FREE Server Checkup By Expert Server Admins - $125 Value\" \/><\/a><\/span><script charset=\"utf-8\" src=\"https:\/\/js.hscta.net\/cta\/current.js\"><\/script><script type=\"text\/javascript\"> hbspt.cta.load(2725694, '9d590242-d641-4383-94b4-8cfd62f0af6b', {}); <\/script><\/span><!-- end HubSpot Call-to-Action Code --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In order to get a valid SSL certificate, you will need to generate a CSR that a certificate signing authority (such as Verisign or Thawte) will request. You have to&hellip;<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[3],"tags":[20],"class_list":["post-301","post","type-post","status-publish","format-standard","hentry","category-technical-articles","tag-security"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/301","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/comments?post=301"}],"version-history":[{"count":5,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/301\/revisions"}],"predecessor-version":[{"id":3425,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/301\/revisions\/3425"}],"wp:attachment":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media?parent=301"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/categories?post=301"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/tags?post=301"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}