title: OpenSSL certificate is giving 'Invalid keystore format' in tomcat 8
body: <p>I am using tomcat 8 and need to make it SSL, So I use openSSL to generate self signed certificate and configured the same in tomcat's server.xml file. But I am getting the below exception</p>
  
  <pre><code>INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-7443"]
  16-Apr-2015 09:50:56.647 SEVERE [main] org.apache.coyote.AbstractProtocol.init Failed to initialize end point associated with ProtocolHandler ["http-nio-7443"]
   java.io.IOException: Invalid keystore format
      at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:650)
      at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:55)
      at java.security.KeyStore.load(KeyStore.java:1433)
      at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:424)
      at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(JSSESocketFactory.java:323)
      at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:581)
      at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:521)
      at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:363)
      at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:730)
      at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:457)
      at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:120)
      at org.apache.catalina.connector.Connector.initInternal(Connector.java:960)
      at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
      at org.apache.catalina.core.StandardService.initInternal(StandardService.java:567)
      at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
      at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:851)
      at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
      at org.apache.catalina.startup.Catalina.load(Catalina.java:576)
      at org.apache.catalina.startup.Catalina.load(Catalina.java:599)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     Write failed: Broken pipegMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43
  </code></pre>