3

我正在尝试使用 SSL 和提供给我的证书(通过委托)配置 JBOSS 应用程序 6.0.1。

我从 Entrust 获得了三个 .CER 格式的证书(根证书、链证书和服务器证书)。

接下来我创建了一个密钥库:

1.keytool -import -alias EntrustL1C -keystore EntrustL1C.mykeystore -trustcacerts -file L1Cchain.cer 输入密钥库密码:重新输入新密码:证书已添加到密钥库

2.keytool -import -alias Root -keystore EntrustL1C.mykeystore -trustcacerts -file L1Croot.cer 输入keystore密码:

3.# keytool -import -alias myalias -keystore EntrustL1C.mykeystore -trustcacerts -file entrustcert.cer 输入密钥库密码:证书已添加到密钥库

我在两个 SSL 部分的 JBOSS 的standalone.xml 中配置了这个:

启动 JBOSS 应用程序时出现此错误。

13:08:23,311 ERROR [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-3) Error initializing endpoint: java.io.IOException: Alias name test does not 
identify a key entry
        at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:517) [jbossweb-7.0.17.Final-redhat-1.jar:]
        at org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:452) [jbossweb-7.0.17.Final-redhat-1.jar:]
        at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:168) [jbossweb-7.0.17.Final-redhat-1.jar:]
        at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:978) [jbossweb-7.0.17.Final-redhat-1.jar:]
        at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:190) [jbossweb-7.0.17.Final-redhat-1.jar:]
        at org.apache.catalina.connector.Connector.init(Connector.java:1001) [jbossweb-7.0.17.Final-redhat-1.jar:]
        at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:268) [jboss-as-web-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.6.0_22]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.6.0_22]
        at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_22]

13:08:23,320 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.web.connector.https: 

org.jboss.msc.service.StartException in service jboss.web.connector.https: JBAS018007: Error starting web connector
        at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:272)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.6.0_22]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.6.0_22]
        at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_22]
Caused by: LifecycleException:  Protocol handler initialization failed: java.io.IOException: Alias name test does not identify a key entry
        at org.apache.catalina.connector.Connector.init(Connector.java:1003)
        at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:268)
    ... 5 more

然后我做了一个 keytool -list -v -keystore EntrustL1C.mykeystore,并注意到别名都是小写的。

我想知道我在配置 JBOOS 应用程序时是否犯了一些基本错误,或者这件事是否应该正常工作而我只是犯了一个愚蠢的粗心错误?

任何指导将不胜感激。

4

2 回答 2

0

在standalone.xml 中确保您在下面输入

<subsystem xmlns="urn:jboss:domain:web:1.5" default-virtual-server="default-host" native="false">
        <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
        <connector name="https" protocol="HTTP/1.1" scheme="https" socket-binding="https" enable-lookups="false" secure="true">
            <ssl name="Certificate issued to Name" key-alias="mykey" password="123456" certificate-key-file="Localtion of Keystore file" cipher-suite="TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA" protocol="TLSv1.2" verify-client="false"/>
        </connector>
        <virtual-server name="default-host" enable-welcome-root="true">
            <alias name="localhost"/>
            <alias name="example.com"/>
        </virtual-server>
</subsystem>
于 2017-12-20T10:32:05.740 回答
0

在您的 JBoss 配置中,您指的是一个名为“test”的别名。由于您的密钥库没有这样的别名,JBoss 会抱怨。在您的 JBoss 配置文件(XML、属性等...)中对“test”进行全局搜索(也可以尝试使用包含的引号)可能有助于查明问题。

于 2017-12-04T09:48:09.033 回答