title: Tomcat over ssl
body: <p>I am trying to setup tomcat over ssl. I received a certificate from my hosting company. I have copied the certificate text to a file name.crt and placed in the /ja/bin dir.</p>
  
  <p>I have create a tomcat.keystore file in the same dir.</p>
  
  <p>I have loaded the name.crt via the keytool. I get the message that the certificate is loaded.</p>
  
  <p>The problem I am facing is that I can connect over port 8443 but the certificate is not trusted because it tells me it is a self signed certificate. However the certificate I got from my hosting company is certified via Commodo so should be regarded as trusted. I loaded the certificate content from this certificate into a file I created named: name.crt </p>
  
  <p>I have altered the server.xml with the following lines:</p>
  
  <p>Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
                 maxThreads="150" SSLEnabled="true" scheme="https" secure="true" keystoreFile="/usr/java/jdk1.8.0_73/bin/tomcat.keystore" keystorePass="*******" 
                 clientAuth="false" sslProtocol="TLS"</p>
  
  <p>(I have commented out the psswd)</p>
  
  <p>Question: is it possible to create your own .crt file with the certificate info from a certified certificate? Or should I:</p>
  
  <ul>
  <li>create keystore file</li>
  <li>create csr via the keystore</li>
  <li>ask for a certificate via a certification authority using the csr file that is generated via the keystore file</li>
  <li>and install the received certificate on the server via the keytool</li>
  </ul>
  
  <p>In other words: do I need to ask for a certificate using the csr that is created via the keystore file or can I use a certificate that is already issued by my hosting company with a keystorefile that I create after the certificate has been issued?</p>
  
  <p>Kind regards,</p>
  
  <p>Michel</p>