{"id":25,"date":"2016-07-31T16:36:00","date_gmt":"2016-07-31T16:36:00","guid":{"rendered":""},"modified":"2021-02-22T01:12:59","modified_gmt":"2021-02-22T01:12:59","slug":"installing-signed-ssl-certificate-on-openfire","status":"publish","type":"post","link":"https:\/\/www.tech-and-dev.com\/blog\/2016\/07\/installing-signed-ssl-certificate-on-openfire.html","title":{"rendered":"Installing a Signed SSL Certificate For Openfire 4 on CentOS"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left;\">\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2016\/07\/openfire.jpg\"><img decoding=\"async\" title=\"Openfire Logo\" src=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2016\/07\/openfire.jpg\" alt=\"Openfire Logo\" border=\"0\" \/><\/a><\/div>\n<p>Openfire is a real time collaboration application server written in Java.<\/p>\n<h2 style=\"text-align: left;\">Checking Installed Certificates<\/h2>\n<p>To check for the installed certificates, run the following command:<\/p>\n<pre>\/opt\/openfire\/jre\/bin\/keytool -list -v -keystore \/opt\/openfire\/resources\/security\/keystore<\/pre>\n<p>&nbsp;<\/p>\n<div dir=\"ltr\"><\/div>\n<div dir=\"ltr\"><\/div>\n<div dir=\"ltr\"><\/div>\n<div dir=\"ltr\">\n<p>The default password is <b>changeit<\/b><\/p>\n<p><a name=\"more\"><\/a><\/p>\n<\/div>\n<div dir=\"ltr\">\n<h2 style=\"text-align: left;\">Working in Keystore Directory<\/h2>\n<\/div>\n<div dir=\"ltr\">Change the path to the keystore directory.<\/div>\n<div dir=\"ltr\">\n<pre>cd \/opt\/openfire\/resources\/security\/keystore<\/pre>\n<h2 style=\"text-align: left;\">Generate a Private Key<\/h2>\n<pre>keytool -genkey -alias <span style=\"color: red;\">yourhostname.com <\/span>-keysize 2048 -keyalg RSA -keystore keystore<\/pre>\n<\/div>\n<div dir=\"ltr\">\n<p>where <span style=\"color: red;\">yourhostname.com<\/span> is the hostname that you will be accessing the server from (example: example.com or yourhostname.com)<\/p>\n<h2 style=\"text-align: left;\">Generate a 2048 bit CSR<\/h2>\n<pre>keytool -certreq -file sslcert -alias yourhostname.com -keysize 2048 -keyalg RSA -keystore keystore<\/pre>\n<h2 style=\"text-align: left;\">Submit the CSR to the CA<\/h2>\n<\/div>\n<div dir=\"ltr\">Use the following command to open the CSR:<\/div>\n<div dir=\"ltr\">\n<pre>vi sslcert<\/pre>\n<\/div>\n<div dir=\"ltr\">Copy and paste the content (called CSR) and submit it to the CA to verify the CSR (Example Godaddy, Thawte, Verisign&#8230;) and Sign the SSL<\/div>\n<div dir=\"ltr\"><\/div>\n<div dir=\"ltr\">\n<h2 style=\"text-align: left;\">Upload the Certificates<\/h2>\n<\/div>\n<div dir=\"ltr\">After the CA approves and sign your SSL, download the ceritificates, you should have the signed certificate as well as the root CA and trust\u00a0 CA<\/div>\n<div dir=\"ltr\"><\/div>\n<div dir=\"ltr\">Open the certificates you have downloaded from the CA, and open them in a text editor (like notepad or gedit).<\/div>\n<div dir=\"ltr\"><\/div>\n<div dir=\"ltr\">On the server, create the signed cert, root cert and trustCA cert and paste the content from the text editor<\/div>\n<div dir=\"ltr\">\n<pre>vi rootCert<\/pre>\n<\/div>\n<div dir=\"ltr\">\n<pre>vi trustCert<\/pre>\n<\/div>\n<div dir=\"ltr\">\n<pre>vi signedCert<\/pre>\n<\/div>\n<div dir=\"ltr\"><\/div>\n<div dir=\"ltr\"><\/div>\n<div dir=\"ltr\"><\/div>\n<div dir=\"ltr\">\n<p>&nbsp;<\/p>\n<h2 style=\"text-align: left;\">Import the SSLs in the following order:<\/h2>\n<p>&nbsp;<\/p>\n<pre>keytool -import -trustcacerts -alias root -file rootCert -keystore keystore<\/pre>\n<p>&nbsp;<\/p>\n<pre>keytool -import -trustcacerts -alias root_ca -file trustCert -keystore keystore<\/pre>\n<p>&nbsp;<\/p>\n<pre>keytool -import -keystore keystore -alias yourhost.com -file signedCert<\/pre>\n<h2 style=\"text-align: left;\">Delete the default old certs:<\/h2>\n<pre>keytool -delete -keystore keystore -alias yourhost.com_rsa\r\nkeytool -delete -keystore keystore -alias yourhost.com_dsa<\/pre>\n<h2 style=\"text-align: left;\">Restart Openfire for changes to take effects<\/h2>\n<pre>service openfire restart<\/pre>\n<\/div>\n<div dir=\"ltr\"><\/div>\n<div dir=\"ltr\"><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Openfire is a real time collaboration application server written in Java. Checking Installed Certificates To check for the installed certificates, run the following command: \/opt\/openfire\/jre\/bin\/keytool -list -v -keystore \/opt\/openfire\/resources\/security\/keystore &nbsp; The default password is changeit Working in Keystore Directory Change the path to the keystore directory. cd \/opt\/openfire\/resources\/security\/keystore Generate a Private Key keytool -genkey -alias [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[17,6,35],"tags":[],"class_list":["post-25","post","type-post","status-publish","format-standard","hentry","category-centos","category-linux","category-openfire"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts\/25","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/comments?post=25"}],"version-history":[{"count":2,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts\/25\/revisions"}],"predecessor-version":[{"id":362,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts\/25\/revisions\/362"}],"wp:attachment":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/media?parent=25"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/categories?post=25"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/tags?post=25"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}