Keystore not working with CA cert in wildfly
<p>So I bought a certificate I got a certificate, a key, and intermediate that has 2 beginnings I dont know if that counts or should be add as separated intermediate.</p>

<p>I added the certificate and the intermidate like this.</p>

<pre><code>keytool -import -trustcacerts -alias rootmydomain -file rootmydomain.crt -keystore mykeystore.keystore
keytool -import -trustcacerts -alias interm.mydomain -file interm.mydomain.crt -keystore mykeystore.keystore 
</code></pre>

<p>I didnt have a problem so far, it crated a mykeystore.keystore file in my wildfly/standalone/configuration/ folder.  I was even able to list my entries in mykeystore.keystore.</p>

<p>Then added the following to my standalone.xml.</p>

<pre><code>&lt;security-realm name="ssl-realm"&gt;
   &lt;server-identities&gt;
       &lt;ssl&gt;
           &lt;keystore path="mykeystore.keystore" relative-to="jboss.server.config.dir" keystore-password="mypassword" alias="rootmydomain" key-password="mypassword"/&gt;
       &lt;/ssl&gt;
   &lt;/server-identities&gt;
&lt;/security-realm&gt;
</code></pre>

<p>And I get the followin error:</p>

<pre><code>04:55:22,538 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.server.controller.management.security_realm.ssl-realm.key-manager: org.jboss.msc.service.StartException in service jboss.server.controller.management.security_realm.ssl-realm.key-manager: WFLYDM0083: The KeyStore /opt/wildfly-10.0.0.Final/standalone/configuration/mykeystore.keystore does not contain any keys.        
</code></pre>

<p>I had the same configuration with an cert generated by myself and it worked.  I dont know why I am not able to make is work like this.</p>