首页 > 解决方案 > Wildfly 服务器上的 SSL 证书安装

问题描述

我试图在托管在 aws Ec2 实例中的 Wildfly 应用程序服务器上安装 SSL 证书。我在 godaddy 购买了 SSL 证书。我从 godaddy 门户下载了 SSL ssl 证书 zip。其中包括以下 1 .gd_bundle-g2-g1.crt 2 .gdig2.crt.pem 3. 70c350d31695.crt 4. 70c350d31695.pem

使用以下命令创建密钥库并将证书导入密钥库

keytool -genkey -alias wildfly -keyalg RSA -keystore wildfly.jks

keytool -import -alias root -keystore wildfly.jks -trustcacerts -file 70c350d31695.crt

keytool -import -alias intermed -keystore wildfly.jks -trustcacerts -file gd_bundle-g2-g1.crt

还在wildfly中完成配置如下standalone.xml

<security-realm`enter code here` name="SslRealm">
      <server-identities>
         <ssl>
            <keystore path="/home/centos/ssl/newssl/wildfly.jks" alias="wildfly" keystore-password="OHGv216TZDhbd" />
          </ssl>
      </server-identities>
  </security-realm>

and
  <https-listener name="default-ssl" socket-binding="https" security-realm="SslRealm"/> 

但重新启动应用程序后,密钥库已识别但 https 证书无法识别。当我在浏览器中双击证书时,它只有密钥库信息而不是证书信息。请帮我解决这个问题。

在浏览器证书错误中,如下所示 在此处输入图像描述

标签: sslwildflykeystore

解决方案


我认为您的密钥库中需要一个包含所有详细信息的条目。您可能会发现使用 KSE ( https://keystore-explorer.org/ ) 而不是 cli更容易


推荐阅读