{"id":131,"date":"2019-07-09T07:09:40","date_gmt":"2019-07-09T07:09:40","guid":{"rendered":"https:\/\/www.ssls.com\/knowledgebase\/?p=131"},"modified":"2023-06-20T12:50:25","modified_gmt":"2023-06-20T12:50:25","slug":"how-to-install-an-ssl-certificate-on-glassfish","status":"publish","type":"post","link":"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/","title":{"rendered":"How to install an SSL certificate on GlassFish"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">After your certificate is <\/span><a href=\"https:\/\/www.ssls.com\/knowledgebase\/okay-so-i-ordered-an-ssl-how-do-i-get-it-to-work-on-my-domain\"><span style=\"font-weight: 400;\">activated<\/span><\/a><span style=\"font-weight: 400;\"> and issued, you can proceed with its installation on GlassFish.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Since GlassFish uses keystores (<\/span><strong>.jks<\/strong><span style=\"font-weight: 400;\"> files), the certificate files need to be imported into the keystore with the corresponding private key before installation. For this, you will need to locate the keystore that was used to generate the CSR. This keystore is the only one that contains the private key for your certificate. If you cannot retrieve the keystore, the certificate will need to be <\/span><a href=\"https:\/\/www.ssls.com\/knowledgebase\/how-can-i-get-my-certificate-reissued\"><span style=\"font-weight: 400;\">reissued<\/span><\/a><span style=\"font-weight: 400;\"> with a new keystore.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Certificate files can be <\/span><a href=\"https:\/\/www.ssls.com\/knowledgebase\/can-i-download-certificate-somewhere-on-your-site\"><span style=\"font-weight: 400;\">downloaded<\/span><\/a><span style=\"font-weight: 400;\"> from your SSLs.com account or retrieved from the email sent by Comodo (<a href=\"https:\/\/www.ssls.com\/knowledgebase\/comodo-ca-rebrands-as-sectigo\">now Sectigo<\/a>). The .zip archive downloaded from your account will contain your certificate and CA bundle in PEM format (.crt and .ca-bundle files), and in the PKCS#7 format (.p7b). We recommend importing the certificate files in PKCS#7 format (.p7b \/ .cer) since this process is simpler; however, they can be imported in PEM as well.<\/span><\/p>\n<p><span class=\"wysiwyg-underline\"><strong>Importing the certificate<\/strong><\/span><\/p>\n<p><span style=\"font-weight: 400;\">The certificate files should be uploaded to your server so they can be imported into the keystore. It is sufficient to import the certificate in only one of the following formats.<\/span><\/p>\n<p><strong>&#8211; PKCS#7 (.p7b, .cer)<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">Importing the certificate in PKCS#7 is done with a single command:<\/span><\/p>\n<p><em><strong>keytool -import -trustcacerts -alias <\/strong><strong>myalias<\/strong><strong> -file <\/strong><strong>file.p7b<\/strong><strong> -keystore <\/strong><strong>mykeystore<\/strong><strong>.jks<\/strong><\/em><\/p>\n<p><span style=\"font-weight: 400;\">You will be prompted to enter the keystore password that was set when creating the keystore. The <\/span><strong>myalias<\/strong><span style=\"font-weight: 400;\"> value should be the same alias that was initially set for the keystore. You can review the alias with this command: keytool -list -v -keystore mykeystore.jks<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Below is a screenshot of an example import:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img decoding=\"async\" src=\"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/glsf_1.png\"><\/span><\/p>\n<p><strong>&#8211; PEM (.crt, .ca-bundle)<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">Importing the certificate files in PEM requires first importing the CA certificates (.ca-bundle file), and then importing the certificate itself. If you do not have the .ca-bundle file, you can <\/span><a href=\"https:\/\/www.ssls.com\/knowledgebase\/can-i-download-certificate-somewhere-on-your-site\"><span style=\"font-weight: 400;\">download<\/span><\/a><span style=\"font-weight: 400;\"> it from your SSLs.com account.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The CA bundle can be imported with this command:<\/span><\/p>\n<p><em><strong>keytool -import -trustcacerts -alias <\/strong><strong>ca<\/strong><strong> -file <\/strong><strong>file.ca-bundle<\/strong><strong> -keystore <\/strong><strong>mykeystore<\/strong><strong>.jks<\/strong><\/em><\/p>\n<p><span style=\"font-weight: 400;\">The alias used to import the CA bundle can be any name, but it has to be different from the alias of the keystore.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">When the CA bundle is imported, you can import the certificate with the following command:<\/span><\/p>\n<p><em><strong>keytool -import -trustcacerts -alias <\/strong><strong>myalias<\/strong><strong> -file <\/strong><strong>file.crt<\/strong><strong> -keystore <\/strong><strong>mykeystore<\/strong><strong>.jks<\/strong><\/em><\/p>\n<p><span style=\"font-weight: 400;\">Here the alias has to be the same as the keystore alias. The screenshot below illustrates the import process for certificate files in PEM:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img decoding=\"async\" src=\"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/glsf_2.png\"><\/span><\/p>\n<p><span class=\"wysiwyg-underline\"><strong>Installation<\/strong><\/span><\/p>\n<p><span style=\"font-weight: 400;\">When the keystore is ready, it should be imported into the default GlassFist keystore, which can be found in the following location: <\/span><strong>glassfish4\/glassfish\/domains\/<\/strong><strong>domain1<\/strong><strong>\/config\/keystore.jks<\/strong><\/p>\n<p><strong>domain1<\/strong><span style=\"font-weight: 400;\"> is the default domain created by GlassFish. If you have added a new domain to GlassFish, the corresponding directory name should be used instead.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The following command is used to import one keystore into another:<\/span><\/p>\n<p><em><strong>keytool -importkeystore -srckeystore <\/strong><strong>mykeystore<\/strong><strong>.jks -destkeystore keystore.jks<\/strong><\/em><\/p>\n<p><span style=\"font-weight: 400;\">You will be prompted to type in the password for both keystores, starting from the destination keystore <\/span><em><span style=\"font-weight: 400;\">keystore.jks<\/span><\/em><span style=\"font-weight: 400;\">. The password for GlassFish keystores is the same as the GlassFish master password for the domain; by default, it is <\/span><strong>changeit<\/strong><span style=\"font-weight: 400;\">. Depending on the certificate format you used for import, there will be a different number of imported entries. If you used different passwords for the keystore and the private key, the private key password will need to be entered too.<\/span><\/p>\n<p><strong>Note: <\/strong><span style=\"font-weight: 400;\">For the certificate to work on GlassFish, <\/span><span style=\"font-weight: 400;\">the GlassFish master password for the domain, the keystore password, and the private key password <\/span><strong>must all be the same<\/strong><strong>.<\/strong><span style=\"font-weight: 400;\"> If one of the passwords does not match the others, please see the Troubleshooting section at the end to change it.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">You will receive a confirmation saying the import was successful, as shown below:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img decoding=\"async\" src=\"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/glsf_3.png\"><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Once your keystore is imported, GlassFish configuration needs to be updated to start using the new certificate. This can be done using the GlassFish administration console, or by manually updating configuration in the domain.xml file.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&nbsp;<\/span><\/p>\n<p><span class=\"wysiwyg-underline\"><strong>Web Interface (GlassFish Administration Console)<\/strong><\/span><\/p>\n<p><span style=\"font-weight: 400;\">To access the GlassFish Administration Console remotely, the <\/span><strong>secure administration <\/strong><span style=\"font-weight: 400;\">feature needs to be enabled for the domain first. This can be done by using the following command: asadmin enable-secure-admin example.com<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Once enabled, you can access the administration console via <\/span><span style=\"font-weight: 400;\">https:\/\/example.com:4848<\/span><span style=\"font-weight: 400;\">. You will need to bypass the certificate warning given by the self-signed certificate that is installed on GlassFish by default.<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><br \/>\nTo enable the certificate via the GlassFish Administration Console, enter this menu: <strong>Configurations &gt;&gt; server-config &gt;&gt; HTTP Service &gt;&gt; HTTP Listeners &gt;&gt; http-listener-2<\/strong>:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img decoding=\"async\" src=\"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/glsf_4.png\"><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Switch to the <strong>SSL<\/strong> tab, enter your certificate alias <\/span><strong>myalias <\/strong><span style=\"font-weight: 400;\">as the <\/span><strong>Certificate NickName<\/strong><span style=\"font-weight: 400;\">, and click <strong>Save<\/strong>:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img decoding=\"async\" src=\"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/09\/glsf_5.png\"><\/span><\/p>\n<p><span style=\"font-weight: 400;\">The default GlassFish port for HTTPS is 8181; you may want to change it to the usual 443 in the <strong>General<\/strong> tab:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img decoding=\"async\" src=\"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/09\/glsf_6.png\"><\/span><\/p>\n<p><span style=\"font-weight: 400;\">The certificate can be installed for the GlassFish Administration Console in the same way by going to HTTP Listeners &gt;&gt; admin-listener.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&nbsp;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">It is possible not all configuration references will be updated to the new alias. In this case, it will be necessary to update them manually in domain.xml.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">&nbsp;<\/span><\/p>\n<p><span class=\"wysiwyg-underline\"><strong>Editing domain.xml<\/strong><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Instead of using the web interface (GlassFish Administration Console), you can manually edit the domain.xml configuration file with the appropriate certificate alias and port. The file is located in <\/span><strong>glassfish4\/glassfish\/domains\/<\/strong><strong>domain1<\/strong><strong>\/config\/domain.xml<\/strong><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Before opening the file, we recommend stopping the GlassFish service for this domain with the following command:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> <em><strong>asadmin stop-domain example.com<\/strong><\/em><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Open the file with your preferred text editor and locate any reference to <\/span><strong>s1as<\/strong><span style=\"font-weight: 400;\">, which is the default certificate alias used by GlassFish. <\/span><strong>s1as<\/strong><span style=\"font-weight: 400;\"> should be replaced with <\/span><strong>myalias<\/strong><span style=\"font-weight: 400;\">,<\/span><span style=\"font-weight: 400;\">our certificate alias. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">If the file contains references to port 8181, you can also update them to 443:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img decoding=\"async\" src=\"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/09\/glsf_7.png\"><\/span><\/p>\n<p><span style=\"font-weight: 400;\">If all aliases are updated to your alias, the certificate will also be installed for the GlassFish Administration Console.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Save the changes in domain.xml and start the domain: <\/span><\/p>\n<p><em><strong>asadmin start-domain example.com<\/strong><\/em><\/p>\n<p><span style=\"font-weight: 400;\"><img decoding=\"async\" src=\"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/glsf_8.png\"><\/span><\/p>\n<p><span style=\"font-weight: 400;\">This completes the installation, and the domain can now be accessed via HTTPS.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">You can use this tool to check certificate installation: <\/span><a href=\"https:\/\/decoder.link\/sslchecker\"><span style=\"font-weight: 400;\">https:\/\/decoder.link\/sslchecker<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><span class=\"wysiwyg-font-size-large\"><strong>Optional configuration<\/strong><\/span><\/p>\n<p><span class=\"wysiwyg-underline\"><strong>Using your own keystore<\/strong><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Instead of importing your keystore into the default GlassFish keystore keystore.jks, you can edit domain.xml to reference your own keystore instead. Similar to the above editing, all references to <\/span><strong>keystore.jks<\/strong><span style=\"font-weight: 400;\"> need to be replaced with your <\/span><strong>mykeystore<\/strong><strong>.jks <\/strong><span style=\"font-weight: 400;\">keystore filename. In this case, your personal keystore should be placed into the same directory with the default keystore:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img decoding=\"async\" src=\"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/09\/glsf_9.png\"><\/span><\/p>\n<p><span class=\"wysiwyg-underline\"><strong>Redirect to HTTPS<\/strong><\/span><\/p>\n<p><span style=\"font-weight: 400;\">To redirect all HTTP traffic to HTTPS, open <\/span><strong>default-web.xml <\/strong><span style=\"font-weight: 400;\">(or your web.xml file if you have one) located in the domain config directory <\/span><strong>glassfish4\/glassfish\/domains\/<\/strong><strong>domain1<\/strong><strong>\/config<\/strong><span style=\"font-weight: 400;\"> and add the following within &lt;web-app&gt; \u2026 &lt;\/web-app&gt;:<\/span><\/p>\n<p><em><span style=\"font-weight: 400;\"> &nbsp;&lt;security-constraint&gt;<\/span><\/em><\/p>\n<p><em><span style=\"font-weight: 400;\"> &nbsp;&nbsp;&nbsp;&lt;web-resource-collection&gt;<\/span><\/em><\/p>\n<p><em><span style=\"font-weight: 400;\"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;web-resource-name&gt;Viewpoint Secure URLs&lt;\/web-resource-name&gt;<\/span><\/em><\/p>\n<p><em><span style=\"font-weight: 400;\"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;url-pattern&gt;\/*&lt;\/url-pattern&gt;<\/span><\/em><\/p>\n<p><em><span style=\"font-weight: 400;\"> &nbsp;&nbsp;&nbsp;&lt;\/web-resource-collection&gt;<\/span><\/em><\/p>\n<p><em><span style=\"font-weight: 400;\"> &nbsp;&nbsp;&nbsp;&lt;user-data-constraint&gt;<\/span><\/em><\/p>\n<p><em><span style=\"font-weight: 400;\"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;transport-guarantee&gt;CONFIDENTIAL&lt;\/transport-guarantee&gt;<\/span><\/em><\/p>\n<p><em><span style=\"font-weight: 400;\"> &nbsp;&nbsp;&nbsp;&lt;\/user-data-constraint&gt;<\/span><\/em><\/p>\n<p><em><span style=\"font-weight: 400;\"> &nbsp;&lt;\/security-constraint&gt;<\/span><\/em><\/p>\n<p><span style=\"font-weight: 400;\">An example of what it might look like:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img decoding=\"async\" src=\"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/glsf_10.png\"><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Save the changes and restart the domain <\/span><span style=\"font-weight: 400;\">\u2013<\/span><span style=\"font-weight: 400;\"> this will complete the setup.<\/span><\/p>\n<p><span class=\"wysiwyg-font-size-large\"><strong>Troubleshooting<\/strong><\/span><\/p>\n<p><span style=\"font-weight: 400;\">This section covers several more or less common errors that can be encountered during installation, checking errors, and guidelines for password changes.<\/span><\/p>\n<p><span class=\"wysiwyg-underline\"><strong>Errors<\/strong><\/span><\/p>\n<p><span class=\"wysiwyg-underline\"><span style=\"font-weight: 400;\">keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect<\/span><\/span><\/p>\n<p><span style=\"font-weight: 400;\">This keytool error will be displayed during any action with the keystore if the entered keystore password or private key password is incorrect.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If you do not remember the password, unfortunately, there is no way to recover it, and you will need to create a new keystore.<\/span><\/p>\n<p><span class=\"wysiwyg-underline\">keytool error: java.lang.Exception: Failed to establish chain from reply<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The above error occurs when the keystore does not have the intermediate certificates (otherwise known as the CA bundle) needed to establish the full chain. Make sure you have imported the <\/span><a href=\"https:\/\/www.ssls.com\/knowledgebase\/Where-do-I-get-a-Bundle-file\"><span style=\"font-weight: 400;\">CA bundle certificates<\/span><\/a><span style=\"font-weight: 400;\"> first, or better, try importing the certificate in PKCS#7.<\/span><\/p>\n<p><span class=\"wysiwyg-underline\"><span style=\"font-weight: 400;\">There is a process already using the admin port 4848 &#8212; it probably is another instance of a GlassFish server<\/span><span style=\"font-weight: 400;\">.Command start-domain failed<\/span><span style=\"font-weight: 400;\">.<\/span><\/span><\/p>\n<p><span style=\"font-weight: 400;\">If you cannot start the domain with this error being displayed, you will need to kill the java process manually. First, run this command to locate the process: <\/span><\/p>\n<p><em><strong>sudo netstat -ntulp<\/strong><\/em><\/p>\n<p><span style=\"font-weight: 400;\"><img decoding=\"async\" src=\"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/09\/glsf_11.png\"><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Copy the PID of java running on your GlassFish ports (15780 in the above screenshot), and run this command to kill the process:<\/span><\/p>\n<p><em><strong>kill <\/strong><strong>15780<\/strong><\/em><\/p>\n<p><span style=\"font-weight: 400;\">You will now be able to start the domain using the usual asadmin commands.<\/span><\/p>\n<p><span class=\"wysiwyg-underline\"><strong>Checking errors \/ Debug<\/strong><\/span><\/p>\n<p><span style=\"font-weight: 400;\">If you encounter any issues with the HTTPS connection, it is worth checking the server log for errors, which is located in <\/span><strong>glassfish4\/glassfish\/domains\/<\/strong><strong>domain1<\/strong><strong>\/logs\/server.log<\/strong><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This will contain sufficient information on the SSL errors; however, if you feel it is not enough, you can set the debug level to SSL in domain.xml by adding the following JVM option within the <\/span><span style=\"font-weight: 400;\">&lt;java-config&gt;<\/span><span style=\"font-weight: 400;\"> section: <\/span><em><span style=\"font-weight: 400;\">&lt;jvm-options&gt;-Djavax.net.debug=SSL&lt;\/jvm-options&gt;<\/span><\/em><\/p>\n<p><span style=\"font-weight: 400;\"><img decoding=\"async\" src=\"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/09\/glsf_12.png\"><\/span><\/p>\n<p><span class=\"wysiwyg-underline\"><strong>Checking the keystore<\/strong><\/span><\/p>\n<p><span style=\"font-weight: 400;\">You can check the content of a keystore with this command:<\/span><\/p>\n<p><em><strong>keytool -list -keystore <\/strong><strong>mykeystore<\/strong><strong>.jks<\/strong><\/em><\/p>\n<p><span style=\"font-weight: 400;\">This will give you a short list of all entries in the keystore. To get more information on each entry (e. g., how many certificates it contains, or if there is a private key), you can add the -v flag:<\/span><\/p>\n<p><em><strong>keytool -list -v -keystore <\/strong><strong>mykeystore<\/strong><strong>.jks<\/strong><\/em><\/p>\n<p><span style=\"font-weight: 400;\">In the below example, the keystore example.jks contains only one entry with a private key:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img decoding=\"async\" src=\"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/glsf_13.png\"><\/span><\/p>\n<p><span class=\"wysiwyg-underline\"><strong>Changing passwords<\/strong><\/span><\/p>\n<p><span style=\"font-weight: 400;\">For the certificate to work, the GlassFish master password for the domain, the keystore password, and the private key password must all be the same. If they are not, you will receive various errors upon HTTPS connection and in the server log. To make sure all three passwords are the same, you can use the commands below to change them.<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><br \/>\n&#8211;<span class=\"wysiwyg-underline\"> GlassFish domain master password<\/span><br \/>\nThe GlassFish master password is \u201c<em>changeit<\/em>\u201d by default and can be changed with the change-master-password subcommand of asadmin:<\/span><\/p>\n<p><em><strong>asadmin change-master-password <\/strong><strong>domain1<\/strong><\/em><strong><br \/>\n<\/strong><\/p>\n<p><span style=\"font-weight: 400;\"><strong><img decoding=\"async\" src=\"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/glsf_14.png\"><\/strong><\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; <span class=\"wysiwyg-underline\">Keystore password<\/span><br \/>\nThe password to a keystore can be changed with the following keytool command:<\/span><\/p>\n<p><strong><em>keytool -storepasswd -keystore mykeystore.jks<\/em><br \/>\n<\/strong><\/p>\n<p><span style=\"font-weight: 400;\"><strong><img decoding=\"async\" src=\"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/glsf_15.png\"><\/strong><\/span><\/p>\n<p><span style=\"font-weight: 400;\">&#8211; Private key password<br \/>\nThe password to the private key within the keystore can be changed with this command:<\/span><\/p>\n<p><strong><em>keytool -keypasswd -alias myalias -keystore mykeystore.jks<\/em><br \/>\n<\/strong><\/p>\n<p><span style=\"font-weight: 400;\"><strong><img decoding=\"async\" src=\"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/glsf_16.png\"><\/strong><\/span><\/p>\n<p><span class=\"wysiwyg-underline\"><strong>Sources<\/strong><\/span><\/p>\n<p><span style=\"font-weight: 400;\">For further reading, you can refer to the documentation listed below:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><em>Keytool<\/em>: <\/span><a href=\"https:\/\/docs.oracle.com\/javase\/6\/docs\/technotes\/tools\/windows\/keytool.html\"><span style=\"font-weight: 400;\">https:\/\/docs.oracle.com\/javase\/6\/docs\/technotes\/tools\/windows\/keytool.html<\/span><\/a><\/p>\n<p><span style=\"font-weight: 400;\"><em>GlassFish documentation<\/em>: <\/span><a href=\"https:\/\/javaee.github.io\/glassfish\/documentation\"><span style=\"font-weight: 400;\">https:\/\/javaee.github.io\/glassfish\/documentation<\/span><\/a><\/p>\n<p><span style=\"font-weight: 400;\"><em>GlassFish Administration Guide<\/em>: <\/span><a href=\"https:\/\/javaee.github.io\/glassfish\/doc\/4.0\/administration-guide.pdf\"><span style=\"font-weight: 400;\">https:\/\/javaee.github.io\/glassfish\/doc\/4.0\/administration-guide.pdf<\/span><\/a><\/p>\n<p><span style=\"font-weight: 400;\"><em>GlassFish Security Guide<\/em>: <\/span><a href=\"https:\/\/javaee.github.io\/glassfish\/doc\/4.0\/security-guide.pdf\"><span style=\"font-weight: 400;\">https:\/\/javaee.github.io\/glassfish\/doc\/4.0\/security-guide.pdf<\/span><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>After your certificate is activated and issued, you can proceed with its installation on GlassFish. Since GlassFish uses keystores (.jks files), the certificate files need to be imported into the keystore with the corresponding private key before installation. For this, you will need to locate the keystore that was used to generate the CSR. This ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-131","post","type-post","status-publish","format-standard","hentry","category-ssl-installation-instructions"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to install an SSL certificate on GlassFish \u2013 HelpDesk | SSLs.com<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to install an SSL certificate on GlassFish \u2013 HelpDesk | SSLs.com\" \/>\n<meta property=\"og:description\" content=\"After your certificate is activated and issued, you can proceed with its installation on GlassFish. Since GlassFish uses keystores (.jks files), the certificate files need to be imported into the keystore with the corresponding private key before installation. For this, you will need to locate the keystore that was used to generate the CSR. This ..Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/\" \/>\n<meta property=\"og:site_name\" content=\"SSL Certificate Knowledgebase | SSLs.com\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/SSLsCom\" \/>\n<meta property=\"article:published_time\" content=\"2019-07-09T07:09:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-06-20T12:50:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/glsf_1.png\" \/>\n<meta name=\"author\" content=\"sslbizdev\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@SSLscom\" \/>\n<meta name=\"twitter:site\" content=\"@SSLscom\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"sslbizdev\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/\"},\"author\":{\"name\":\"sslbizdev\",\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/#\/schema\/person\/7e29a188929740c7a59d9a1c15c18806\"},\"headline\":\"How to install an SSL certificate on GlassFish\",\"datePublished\":\"2019-07-09T07:09:40+00:00\",\"dateModified\":\"2023-06-20T12:50:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/\"},\"wordCount\":1801,\"publisher\":{\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/glsf_1.png\",\"articleSection\":[\"SSL Installation instructions\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/\",\"url\":\"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/\",\"name\":\"How to install an SSL certificate on GlassFish \u2013 HelpDesk | SSLs.com\",\"isPartOf\":{\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/glsf_1.png\",\"datePublished\":\"2019-07-09T07:09:40+00:00\",\"dateModified\":\"2023-06-20T12:50:25+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/#primaryimage\",\"url\":\"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/glsf_1.png\",\"contentUrl\":\"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/glsf_1.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.ssls.com\/knowledgebase\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to install an SSL certificate on GlassFish\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/#website\",\"url\":\"https:\/\/www.ssls.com\/knowledgebase\/\",\"name\":\"SSL Certificate Knowledgebase | SSLs.com\",\"description\":\"SSL Knowledgebase | SSLs.com\",\"publisher\":{\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.ssls.com\/knowledgebase\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/#organization\",\"name\":\"SSLs.com\",\"url\":\"https:\/\/www.ssls.com\/knowledgebase\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/8WCg7Uph_400x400-1.png\",\"contentUrl\":\"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/8WCg7Uph_400x400-1.png\",\"width\":400,\"height\":400,\"caption\":\"SSLs.com\"},\"image\":{\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/SSLsCom\",\"https:\/\/x.com\/SSLscom\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/#\/schema\/person\/7e29a188929740c7a59d9a1c15c18806\",\"name\":\"sslbizdev\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/b43c2e48b8cf4c353e91aa8232dac0c56e490f3f1eff58a7652c7d9a866e3f66?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b43c2e48b8cf4c353e91aa8232dac0c56e490f3f1eff58a7652c7d9a866e3f66?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b43c2e48b8cf4c353e91aa8232dac0c56e490f3f1eff58a7652c7d9a866e3f66?s=96&d=mm&r=g\",\"caption\":\"sslbizdev\"},\"url\":\"https:\/\/www.ssls.com\/knowledgebase\/author\/sslbizdev\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to install an SSL certificate on GlassFish \u2013 HelpDesk | SSLs.com","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/","og_locale":"en_US","og_type":"article","og_title":"How to install an SSL certificate on GlassFish \u2013 HelpDesk | SSLs.com","og_description":"After your certificate is activated and issued, you can proceed with its installation on GlassFish. Since GlassFish uses keystores (.jks files), the certificate files need to be imported into the keystore with the corresponding private key before installation. For this, you will need to locate the keystore that was used to generate the CSR. This ..Read more","og_url":"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/","og_site_name":"SSL Certificate Knowledgebase | SSLs.com","article_publisher":"https:\/\/www.facebook.com\/SSLsCom","article_published_time":"2019-07-09T07:09:40+00:00","article_modified_time":"2023-06-20T12:50:25+00:00","og_image":[{"url":"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/glsf_1.png","type":"","width":"","height":""}],"author":"sslbizdev","twitter_card":"summary_large_image","twitter_creator":"@SSLscom","twitter_site":"@SSLscom","twitter_misc":{"Written by":"sslbizdev","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/#article","isPartOf":{"@id":"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/"},"author":{"name":"sslbizdev","@id":"https:\/\/www.ssls.com\/knowledgebase\/#\/schema\/person\/7e29a188929740c7a59d9a1c15c18806"},"headline":"How to install an SSL certificate on GlassFish","datePublished":"2019-07-09T07:09:40+00:00","dateModified":"2023-06-20T12:50:25+00:00","mainEntityOfPage":{"@id":"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/"},"wordCount":1801,"publisher":{"@id":"https:\/\/www.ssls.com\/knowledgebase\/#organization"},"image":{"@id":"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/#primaryimage"},"thumbnailUrl":"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/glsf_1.png","articleSection":["SSL Installation instructions"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/","url":"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/","name":"How to install an SSL certificate on GlassFish \u2013 HelpDesk | SSLs.com","isPartOf":{"@id":"https:\/\/www.ssls.com\/knowledgebase\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/#primaryimage"},"image":{"@id":"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/#primaryimage"},"thumbnailUrl":"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/glsf_1.png","datePublished":"2019-07-09T07:09:40+00:00","dateModified":"2023-06-20T12:50:25+00:00","breadcrumb":{"@id":"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/#primaryimage","url":"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/glsf_1.png","contentUrl":"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/glsf_1.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-glassfish\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.ssls.com\/knowledgebase\/"},{"@type":"ListItem","position":2,"name":"How to install an SSL certificate on GlassFish"}]},{"@type":"WebSite","@id":"https:\/\/www.ssls.com\/knowledgebase\/#website","url":"https:\/\/www.ssls.com\/knowledgebase\/","name":"SSL Certificate Knowledgebase | SSLs.com","description":"SSL Knowledgebase | SSLs.com","publisher":{"@id":"https:\/\/www.ssls.com\/knowledgebase\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.ssls.com\/knowledgebase\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.ssls.com\/knowledgebase\/#organization","name":"SSLs.com","url":"https:\/\/www.ssls.com\/knowledgebase\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.ssls.com\/knowledgebase\/#\/schema\/logo\/image\/","url":"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/8WCg7Uph_400x400-1.png","contentUrl":"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/8WCg7Uph_400x400-1.png","width":400,"height":400,"caption":"SSLs.com"},"image":{"@id":"https:\/\/www.ssls.com\/knowledgebase\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/SSLsCom","https:\/\/x.com\/SSLscom"]},{"@type":"Person","@id":"https:\/\/www.ssls.com\/knowledgebase\/#\/schema\/person\/7e29a188929740c7a59d9a1c15c18806","name":"sslbizdev","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/b43c2e48b8cf4c353e91aa8232dac0c56e490f3f1eff58a7652c7d9a866e3f66?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/b43c2e48b8cf4c353e91aa8232dac0c56e490f3f1eff58a7652c7d9a866e3f66?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b43c2e48b8cf4c353e91aa8232dac0c56e490f3f1eff58a7652c7d9a866e3f66?s=96&d=mm&r=g","caption":"sslbizdev"},"url":"https:\/\/www.ssls.com\/knowledgebase\/author\/sslbizdev\/"}]}},"publishpress_future_action":{"enabled":false,"date":"2026-05-25 18:26:33","action":"change-status","newStatus":"draft","terms":[],"taxonomy":"category","extraData":[]},"publishpress_future_workflow_manual_trigger":{"enabledWorkflows":[]},"_links":{"self":[{"href":"https:\/\/www.ssls.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ssls.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ssls.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ssls.com\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ssls.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=131"}],"version-history":[{"count":5,"href":"https:\/\/www.ssls.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/131\/revisions"}],"predecessor-version":[{"id":2033,"href":"https:\/\/www.ssls.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/131\/revisions\/2033"}],"wp:attachment":[{"href":"https:\/\/www.ssls.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ssls.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ssls.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}