我一直在努力让它工作一段时间,现在我已经走到了尽头。我正在尝试将从安全站点获得的证书添加到本地密钥库和信任库,然后让 JBoss 7.1 配置获取它。我主要尝试遵循的文档在这里:http ://docs.oracle.com/javase/1.5.0/docs/tooldocs/solaris/keytool.html 。
这是我正在执行的内容:
keytool -genkey -alias myalias.com -keypass changeit -storepass changeit -keystore keystore.jks
keytool -import -trustcacerts -keystore keystore.jks -storepass changeit -noprompt -alias myalias.com -文件下载-certificate.pem
keytool -export -alias myalias.com -file cacerts.cer -keystore keystore.jks
这是我的 JBoss 7.1 Standalone.xml 文件的相关部分:
<connector name="https" protocol="HTTP/1.1" scheme="https" socket-binding="https" secure="true">
<ssl name="ssl" password="changeit" key-alias="myalias.com" certificate-key-file="${JBOSS_HOME}/keystore.jks" protocol="TLSv1" verify-client="true" ca-certificate-file="${JBOSS_HOME}/keystore.jks"/>
</connector>
最后,这是 JBoss 启动时写在日志中的堆栈跟踪的顶部:
15:39:35,882 ERROR [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-2) Error initializing endpoint: java.io.IOException: SSL configuration is invalid due to No available certificate or key corresponds to the SSL cipher suites which are enabled.
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.checkConfig(JSSESocketFactory.java:788) [jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:493) [jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:168) [jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:977) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:190) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.Connector.init(Connector.java:983) [jbossweb-7.0.13.Final.jar:]
etc...
任何帮助将不胜感激!