title: Error: Alias name [null] does not identify a key entry during implementing SSL in Tomcat
body: <p>I am trying to implement SSL in tomcat 8 first time.</p>
  
  <p>I have third party signed X.509 certificate in the form of .pem file.</p>
  
  <p>However after configuration when I try to start tomcat, it is giving me following error:</p>
  
  <blockquote>
    <p>22-Nov-2017 18:48:01.735 INFO [main]
    org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
    ["https-jsse-nio-8443"] 22-Nov-2017 18:48:01.897 SEVERE [main]
    org.apache.coyote.AbstractProtocol.init Failed to initialize end point
    associated with ProtocolHandler ["https-jsse-nio-8443"] 
    <strong>java.lang.IllegalArgumentException: java.io.IOException: Alias name
    [null] does not identify a key entry</strong>
            at ...</p>
  </blockquote>
  
  <p>Following are the steps I have followed:</p>
  
  <ol>
  <li>Renamed certificate.pem to certificate.p7b.</li>
  <li>Applied following command to inport certificate into keystore:</li>
  </ol>
  
  <p><strong>D:\keytest2>keytool -import -alias tomcat -trustcacerts -file certificate.p7b -keystore keystore.kdb</strong> </p>
  
  <p>Enter keystore password: test<br>
  Re-enter new password: test </p>
  
  <p>...<br>
  ...<br>
  Certificate was added to keystore</p>
  
  <ol start="3">
  <li>Checked imported certificate:</li>
  </ol>
  
  <p><strong><em>D:\keytest2>keytool -list -v -keystore keystore.kd</em></strong></p>
  
  <p>Which gives me following outout:</p>
  
  <p>Keystore type: JKS
  Keystore provider: SUN</p>
  
  <p>Your keystore contains 1 entry</p>
  
  <p>Alias name: tomcat
  Creation date: Nov 22, 2017
  Entry type: trustedCertEntry
  ...
  ...</p>
  
  <p><strong>Tomcat Configuration:</strong></p>
  
  <pre><code>&lt;Connector port="8443" protocol="HTTP/1.1"
                 maxThreads="150" SSLEnabled="true" scheme="https" secure="true" 
                 keystoreFile="file:///D:/keytest2/keystore.kdb" keystorePass="test"
             clientAuth="false" sslProtocol="TLS"&gt;
  </code></pre>
  
  <p>Please guide me where I am doing wrong.</p>