【问题标题】:Jboss 7.1.1 ssl (https) configurationJboss 7.1.1 ssl (https) 配置
【发布时间】:2019-03-10 07:08:00
【问题描述】:

我正在尝试在我的 jboss 7.1.1 应用程序中启用 ssl(https)。以下是我尝试过的步骤

  1. 从认证提供商处收到 root.crt、中间 .crt 和 servercertificate.crt
  2. 执行以下命令

    keytool -genkey -alias jboss7 -keyalg RSA -keystore [Common Name].keystore -validity 365
    keytool -import -trustcacerts -alias root -file [root certificate].crt -keystore [Common Name].keystore
    keytool -import -trustcacerts -alias intermediate -file [intermediate certificate].crt -keystore [Common Name].keystore
    keytool -import -trustcacerts -alias server -file [Common Name].crt -keystore [Common Name].keystore
    
  3. 将生成的密钥库包含在standalone.xml 文件中

    <connector name="https" protocol="HTTP/1.1" scheme="https" socket-binding="https" secure="true">
            <ssl name="jboss7-ssl" key-alias="jboss7" password="password" certificate-key-file="${jboss.server.config.dir}/server.keystore" protocol="TLSv1"/>
        </connector>
    

并重新启动服务器。

我的页面现在加载了https://localhost:8443/project,但它显示

    certificate (invalid) and "This CA Root certificate is not trusted because it is not in the Trusted Root Certification Authorities store."

谁能告诉我我造成的错误。

【问题讨论】:

  • 您生成了别名为jboss7 的密钥,但您将服务器证书导入了别名server。您必须将服务器证书(或链)导入到私钥别名,即jboss7。另外要清楚的是,您在命令中将文件名显示为[Common Name].keystore,但在XML 中显示为server.keystore;这些必须相同。

标签: java certificate ssl-certificate jboss7.x keytool


【解决方案1】:

keystore 不应作为单独的进程生成。它需要在创建 CSR 时生成。如果没有这样做,那么在 Windows 中可以选择从创建的 CSR 中导出 *.pfx。完成后,此 *.pfx 可用于使用 keytool 生成创建密钥库。

谢谢

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-06-29
    • 1970-01-01
    • 2012-05-28
    • 2012-03-07
    • 2019-03-09
    • 2015-05-25
    • 1970-01-01
    • 2014-04-03
    相关资源
    最近更新 更多