gpt4 book ai didi

Jboss 7.1 中的 SSL 配置 - java.io.IOException : Invalid keystore format

转载 作者:太空宇宙 更新时间:2023-11-03 14:17:14 25 4
gpt4 key购买 nike

我正在为 Linux 服务器中的 JBOSS 7.1 配置 SSL。我按照命令创建了 key 和 csr

openssl genrsa -out app.key -des 2048

openssl req -new -key app.key -out appCert.csr

我注册了委托(delegate)证书,收到了根证书、链证书和服务器证书。服务器证书存储在文件 cert.crt 中

在 JBOSS 7.1 standalone.xml 中,我修改了连接器标签,如下所示。

<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
<connector name="https" scheme="https" protocol="HTTP/1.1" socket-binding="https" enable-lookups="false" secure="true">
<ssl name="APP-ssl" password="abc123" certificate-key-file="/app/JBoss-7.1/standalone/configuration/ssl/app.key" certificate-file="/app/JBoss-7.1/standalone/configuration/ssl/cert.crt"/>
</subsystem>

当我启动 jboss 服务器时,我收到以下错误消息。

错误 [org.apache.tomcat.util.net.jsse.JSSESocketFactory](MSC 服务线程 1-2)无法加载路径为/app/JBoss-7.1/standalone/configuration/ssl/app 的 keystore 类型 JKS。由于 keystore 格式无效导致的 key :java.io.IOException: keystore 格式无效

当我放置链证书时也会发生同样的错误。请帮我解决这个问题。

最佳答案

根据JBoss HTTPS connector documentation ,证书 key 文件属性应该指向 keystore ,而不是 key 。因此,您需要将该 key 导入 JKS keystore 。在 JBoss SSL Configuration documentation 中有关于如何做到这一点的示例。 .

关于Jboss 7.1 中的 SSL 配置 - java.io.IOException : Invalid keystore format,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16905512/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com