首页 > 解决方案 > Jboss 7.1.1 ssl (https) 配置

问题描述

我正在尝试在我的 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."

有人可以告诉我我造成的错误。

标签: javacertificatessl-certificatejboss7.xkeytool

解决方案


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

谢谢


推荐阅读