{"id":631,"date":"2017-03-18T14:03:37","date_gmt":"2017-03-18T14:03:37","guid":{"rendered":"https:\/\/www.thesslstore.com\/knowledgebase\/?post_type=ht_kb&#038;p=631"},"modified":"2018-03-28T05:31:16","modified_gmt":"2018-03-28T05:31:16","slug":"jetty-java-http-servlet-webserver-ssl-installation","status":"publish","type":"ht_kb","link":"https:\/\/www.thesslstore.com\/knowledgebase\/ssl-install\/jetty-java-http-servlet-webserver-ssl-installation\/","title":{"rendered":"How to Install an SSL\/TLS Certificate in Jetty Java HTTP Servlet Web Server"},"content":{"rendered":"<p>The following instructions will guide you through the SSL installation process on Jetty Jave HTTP Servlet Web Server. If you have more than one server or device, you will need to install the certificate on each server or device you need to secure. If you still have not generated your certificate and completed the validation process, reference our <a href=\"\/knowledgebase\/ssl-generate\/\">CSR Generation Instructions<\/a> and disregard the steps below.<\/p>\n<h2>What You&#8217;ll Need<\/h2>\n<h3>1. Your server certificate<\/h3>\n<p>This is the certificate you received from the CA for your domain. You may have been sent this via email. If not, you can download it by visiting your Account Dashboard and clicking on your order.<\/p>\n<h3>2. Your intermediate certificates<\/h3>\n<p>These files allow the devices connecting to your server to identify the issuing CA. There may be more than one of these certificates. If you got your certificate in a ZIP folder, it should also contain the Intermediate certificate(s), which is sometimes referred to as a CA Bundle. If not, <a href=\"\/knowledgebase\/ssl-support\/ca-bundle\/\">download the appropriate CA Bundle for your certificate.<\/a><\/p>\n<h3>3. Your private key<\/h3>\n<p>This file should be on your server, or in your possession if you generated your CSR from a free generator tool. On certain platforms, such as Microsoft IIS, the private key is not immediately visible to you but the server is keeping track of it.<\/p>\n<h2>Installation Instructions<\/h2>\n<h3>1. Convert your certificate files<\/h3>\n<p>You can easily convert your<strong> PEM (.cer or .crt) <\/strong>to <strong>PKCS#7 (.p7b) Format<\/strong>. You can easily do this on your own system by running below OpenSSL command.<\/a><\/p>\n<pre>openssl crl2pkcs7 -nocrl -certfile certificate.cer -out certificate.p7b -certfile CACert.cer<\/pre>\n<h3>2. Import the certificate<\/h3>\n<p>Once your certificate is in <strong>PKCS#7 (.p7b) Format, <\/strong>you&#8217;ll need to add the certificate file to your\u00a0<strong>keystore<\/strong> by running the following command:<\/p>\n<pre>keytool -import -alias [enter_alias_name]  -trustcacerts -file\r\n[enter_certificate_filename].p7b -keystore  [enter_keystore_name]<\/pre>\n<p><strong><em>Note 1:<\/em><\/strong><em> Enter the same alias name and keystore name that was used when generating the private key and Certificate Signing Request (CSR). <\/em><\/p>\n<p><strong><em>Note 2:<\/em><\/strong><em> If you receive Error Message: &#8220;java.lang.Exception: Input not an X.509 certificate&#8221;, double-check the alias\/keystore name entered and the format of the certificate. You may still be using the PEM (.cer or .crt) format and not the correct PKCS#7 (.p7b) format.<\/em><\/p>\n<p>Congratulations! You&#8217;ve successfully installed your SSL certificate! To check your work, visit the website in your browser at <em><u>https:\/\/yourdomain.tld<\/u><\/em> and view the certificate\/site information to see if HTTPS\/SSL is working properly. Remember, you may need to restart your server for changes to take effect.<\/p>\n<p>To check your server&#8217;s configurations more thoroughly, use our <a href=\"\/ssltools\/ssl-checker.php\">SSL Checker Tool<\/a> or contact our Customer Experience Department for additional assistance.<\/p>\n<h2>How to Fix &#8220;<em>certificatessxception: Input not an X.509 certificate&#8221;<\/em> Error<\/h2>\n<p>If you receive the error message\u00a0<em>&#8220;certificatessxception: Input not an X.509 certificate&#8221;,\u00a0<\/em>please follow these alternative Installation Instructions below:<\/p>\n<h3>1. Import the intermediate certificate<\/h3>\n<p>Using the PEM (.cer or .crt) formatted certificate, import the <strong>Intermediate Certificate<\/strong> into your <strong>keystore<\/strong> by running the following command:<\/p>\n<pre>keytool -import -alias intermediate  -trustcacerts -file\r\n intermediate_file_name -keystore [enter_keystore_name]<\/pre>\n<h3>2. Import the server certificate<\/h3>\n<p>Using the PEM (.cer or .crt) formatted certificate, import <strong>Your Server Certificate<\/strong> into your <strong>keystore<\/strong> by running the following command:<\/p>\n<pre>keytool  -import -alias [enter_alias_name] -trustcacerts -file\r\n server_certificate_file_name\u00a0 -keystore [enter_keystore_name]<\/pre>\n<h3>3. Verify the keystore\u00a0contents<\/h3>\n<p>Verify the <strong>Contents<\/strong> of the keystore by running the following command:<\/p>\n<pre>keytool -list -v -keystore\u00a0 your_keystore_filename  &gt;output_filename.txt<\/pre>\n<h3>4. Enter your password<\/h3>\n<p>Enter your <strong>keystore password.<\/strong><\/p>\n<h3>5. View the Output File<\/h3>\n<p>View the <strong>Output File. <\/strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-632\" src=\"https:\/\/www.thesslstore.com\/knowledgebase\/wp-content\/uploads\/2017\/03\/jetty-java-step6.png\" alt=\"Jetty Java Step6\" width=\"875\" height=\"137\" srcset=\"https:\/\/www.thesslstore.com\/knowledgebase\/wp-content\/uploads\/2017\/03\/jetty-java-step6.png 875w, https:\/\/www.thesslstore.com\/knowledgebase\/wp-content\/uploads\/2017\/03\/jetty-java-step6-300x47.png 300w, https:\/\/www.thesslstore.com\/knowledgebase\/wp-content\/uploads\/2017\/03\/jetty-java-step6-768x120.png 768w, https:\/\/www.thesslstore.com\/knowledgebase\/wp-content\/uploads\/2017\/03\/jetty-java-step6-50x8.png 50w, https:\/\/www.thesslstore.com\/knowledgebase\/wp-content\/uploads\/2017\/03\/jetty-java-step6-60x9.png 60w, https:\/\/www.thesslstore.com\/knowledgebase\/wp-content\/uploads\/2017\/03\/jetty-java-step6-35x5.png 35w\" sizes=\"auto, (max-width: 875px) 100vw, 875px\" \/><strong><em>Note:<\/em><\/strong><em> Your Server Certificate will be imported into the alias by the &#8220;Entry Type&#8221; of the specified &#8220;PrivateKeyEntry&#8221;. <\/em><\/p>\n<h3>6. Edit\u00a0the Jetty Connector<\/h3>\n<p>Edit the <strong>Jetty Connector<\/strong> to point to the keystore and password:<\/p>\n<pre>&lt;Call name=\"addConnector\"&gt;\r\n  &lt;Arg&gt;\r\n  &lt;New class=\"org.mortbay.jetty.security.SslSocketConnector\"&gt;\r\n  &lt;Set name=\"Port\"&gt;8443&lt;\/Set&gt;\r\n  &lt;Set name=\"maxIdleTime\"&gt;30000&lt;\/Set&gt;\r\n  &lt;Set name=\"keystore\"&gt;&lt;SystemProperty name=\"jetty.home\"  default=\".\" \/&gt;\/etc\/keystore&lt;\/Set&gt;\r\n  &lt;Set name=\"password\"&gt;OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4&lt;\/Set&gt;\r\n  &lt;Set name=\"keyPassword\"&gt;OBF:1u2u1wml1z7s1z7a1wnl1u2g&lt;\/Set&gt;\r\n  &lt;Set name=\"truststore\"&gt;&lt;SystemProperty name=\"jetty.home\"  default=\".\" \/&gt;\/etc\/keystore&lt;\/Set&gt;\r\n  &lt;Set name=\"trustPassword\"&gt;OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4&lt;\/Set&gt;\r\n  &lt;\/New&gt;\r\n  &lt;\/Arg&gt;\r\n  &lt;\/Call&gt;<\/pre>\n<p><strong><em>Note 1:<\/em><\/strong><em> Reference <a href=\"https:\/\/wiki.eclipse.org\/Jetty\/Howto\/Configure_SSL\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Jetty Configuring Setting<\/a> <\/em><em>for a correct configuration. This Jetty Configuration documentation will also address how to set your SSL\/HTTPS Ports and redirect HTTP to HTTPS. <\/em><\/p>\n<p>Congratulations! You&#8217;ve successfully installed your SSL certificate! To check your work, visit the website in your browser at <em><u>https:\/\/yourdomain.tld<\/u><\/em> and view the certificate\/site information to see if HTTPS\/SSL is working properly. Remember, you may need to restart your server for changes to take effect.<\/p>\n<p>To check your server&#8217;s configurations more thoroughly, use our <a href=\"\/ssltools\/ssl-checker.php\">SSL Checker Tool<\/a> or contact our Customer Experience Department for additional assistance.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The following instructions will guide you through the SSL installation process on Jetty Jave HTTP Servlet Web Server. If you have more than one server or device, you will need to install the certificate on each server or device you need to secure. If you still have not generated your&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"ht-kb-category":[24],"ht-kb-tag":[],"class_list":["post-631","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-ssl-install"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Install an SSL\/TLS Certificate In Jetty Java HTTPS Servlet Web Server - The SSL Store\u2122<\/title>\n<meta name=\"description\" content=\"Make the SSL\/TLS Certificate Installation process easy by following our guide for installing SSL\/TLS Certificate on Jetty Java HTTPS Servlet Web Server.\" \/>\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.thesslstore.com\/knowledgebase\/ssl-install\/jetty-java-http-servlet-webserver-ssl-installation\/\" \/>\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\/TLS Certificate In Jetty Java HTTPS Servlet Web Server - The SSL Store\u2122\" \/>\n<meta property=\"og:description\" content=\"Make the SSL\/TLS Certificate Installation process easy by following our guide for installing SSL\/TLS Certificate on Jetty Java HTTPS Servlet Web Server.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.thesslstore.com\/knowledgebase\/ssl-install\/jetty-java-http-servlet-webserver-ssl-installation\/\" \/>\n<meta property=\"og:site_name\" content=\"Knowledge Base\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/thesslstoredotcom\" \/>\n<meta property=\"article:modified_time\" content=\"2018-03-28T05:31:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.thesslstore.com\/knowledgebase\/wp-content\/uploads\/2017\/04\/thesslstore.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"300\" \/>\n\t<meta property=\"og:image:height\" content=\"300\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"How to Install an SSL\/TLS Certificate In Jetty Java HTTPS Servlet Web Server - The SSL Store\u2122\" \/>\n<meta name=\"twitter:description\" content=\"Make the SSL\/TLS Certificate Installation process easy by following our guide for installing SSL\/TLS Certificate on Jetty Java HTTPS Servlet Web Server.\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.thesslstore.com\/knowledgebase\/wp-content\/uploads\/2017\/04\/thesslstore.jpg\" \/>\n<meta name=\"twitter:site\" content=\"@thesslstore\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install an SSL\/TLS Certificate In Jetty Java HTTPS Servlet Web Server - The SSL Store\u2122","description":"Make the SSL\/TLS Certificate Installation process easy by following our guide for installing SSL\/TLS Certificate on Jetty Java HTTPS Servlet Web Server.","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.thesslstore.com\/knowledgebase\/ssl-install\/jetty-java-http-servlet-webserver-ssl-installation\/","og_locale":"en_US","og_type":"article","og_title":"How to Install an SSL\/TLS Certificate In Jetty Java HTTPS Servlet Web Server - The SSL Store\u2122","og_description":"Make the SSL\/TLS Certificate Installation process easy by following our guide for installing SSL\/TLS Certificate on Jetty Java HTTPS Servlet Web Server.","og_url":"https:\/\/www.thesslstore.com\/knowledgebase\/ssl-install\/jetty-java-http-servlet-webserver-ssl-installation\/","og_site_name":"Knowledge Base","article_publisher":"https:\/\/www.facebook.com\/thesslstoredotcom","article_modified_time":"2018-03-28T05:31:16+00:00","og_image":[{"width":300,"height":300,"url":"https:\/\/www.thesslstore.com\/knowledgebase\/wp-content\/uploads\/2017\/04\/thesslstore.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_title":"How to Install an SSL\/TLS Certificate In Jetty Java HTTPS Servlet Web Server - The SSL Store\u2122","twitter_description":"Make the SSL\/TLS Certificate Installation process easy by following our guide for installing SSL\/TLS Certificate on Jetty Java HTTPS Servlet Web Server.","twitter_image":"https:\/\/www.thesslstore.com\/knowledgebase\/wp-content\/uploads\/2017\/04\/thesslstore.jpg","twitter_site":"@thesslstore","twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.thesslstore.com\/knowledgebase\/ssl-install\/jetty-java-http-servlet-webserver-ssl-installation\/","url":"https:\/\/www.thesslstore.com\/knowledgebase\/ssl-install\/jetty-java-http-servlet-webserver-ssl-installation\/","name":"How to Install an SSL\/TLS Certificate In Jetty Java HTTPS Servlet Web Server - The SSL Store\u2122","isPartOf":{"@id":"https:\/\/www.thesslstore.com\/knowledgebase\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.thesslstore.com\/knowledgebase\/ssl-install\/jetty-java-http-servlet-webserver-ssl-installation\/#primaryimage"},"image":{"@id":"https:\/\/www.thesslstore.com\/knowledgebase\/ssl-install\/jetty-java-http-servlet-webserver-ssl-installation\/#primaryimage"},"thumbnailUrl":"https:\/\/www.thesslstore.com\/knowledgebase\/wp-content\/uploads\/2017\/03\/jetty-java-step6.png","datePublished":"2017-03-18T14:03:37+00:00","dateModified":"2018-03-28T05:31:16+00:00","description":"Make the SSL\/TLS Certificate Installation process easy by following our guide for installing SSL\/TLS Certificate on Jetty Java HTTPS Servlet Web Server.","breadcrumb":{"@id":"https:\/\/www.thesslstore.com\/knowledgebase\/ssl-install\/jetty-java-http-servlet-webserver-ssl-installation\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.thesslstore.com\/knowledgebase\/ssl-install\/jetty-java-http-servlet-webserver-ssl-installation\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.thesslstore.com\/knowledgebase\/ssl-install\/jetty-java-http-servlet-webserver-ssl-installation\/#primaryimage","url":"https:\/\/www.thesslstore.com\/knowledgebase\/wp-content\/uploads\/2017\/03\/jetty-java-step6.png","contentUrl":"https:\/\/www.thesslstore.com\/knowledgebase\/wp-content\/uploads\/2017\/03\/jetty-java-step6.png","width":875,"height":137,"caption":"Certificate chain"},{"@type":"BreadcrumbList","@id":"https:\/\/www.thesslstore.com\/knowledgebase\/ssl-install\/jetty-java-http-servlet-webserver-ssl-installation\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.thesslstore.com\/knowledgebase\/"},{"@type":"ListItem","position":2,"name":"How to Install an SSL\/TLS Certificate in Jetty Java HTTP Servlet Web Server"}]},{"@type":"WebSite","@id":"https:\/\/www.thesslstore.com\/knowledgebase\/#website","url":"https:\/\/www.thesslstore.com\/knowledgebase\/","name":"Knowledge Base","description":"TheSSLstore","publisher":{"@id":"https:\/\/www.thesslstore.com\/knowledgebase\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.thesslstore.com\/knowledgebase\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.thesslstore.com\/knowledgebase\/#organization","name":"The SSL Store\u2122","url":"https:\/\/www.thesslstore.com\/knowledgebase\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.thesslstore.com\/knowledgebase\/#\/schema\/logo\/image\/","url":"https:\/\/www.thesslstore.com\/knowledgebase\/wp-content\/uploads\/2017\/04\/thesslstore.jpg","contentUrl":"https:\/\/www.thesslstore.com\/knowledgebase\/wp-content\/uploads\/2017\/04\/thesslstore.jpg","width":300,"height":300,"caption":"The SSL Store\u2122"},"image":{"@id":"https:\/\/www.thesslstore.com\/knowledgebase\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/thesslstoredotcom","https:\/\/x.com\/thesslstore","https:\/\/www.linkedin.com\/company\/the-ssl-store","https:\/\/www.youtube.com\/user\/thesslstore"]}]}},"_links":{"self":[{"href":"https:\/\/www.thesslstore.com\/knowledgebase\/wp-json\/wp\/v2\/ht-kb\/631","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.thesslstore.com\/knowledgebase\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.thesslstore.com\/knowledgebase\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.thesslstore.com\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thesslstore.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=631"}],"version-history":[{"count":0,"href":"https:\/\/www.thesslstore.com\/knowledgebase\/wp-json\/wp\/v2\/ht-kb\/631\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.thesslstore.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=631"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.thesslstore.com\/knowledgebase\/wp-json\/wp\/v2\/ht-kb-category?post=631"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.thesslstore.com\/knowledgebase\/wp-json\/wp\/v2\/ht-kb-tag?post=631"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}