java - Jboss 7.1.1 ssl (https) 配置
问题描述
我正在尝试在我的 jboss 7.1.1 应用程序中启用 ssl(https)。以下是我尝试过的步骤
- 收到来自认证提供者的root.crt、中间.crt和servercertificate.crt
执行了以下命令
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
在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."
有人可以告诉我我造成的错误。
解决方案
密钥库不应作为单独的进程生成。它需要在创建 CSR 时生成。如果没有这样做,那么在 Windows 中,可以选择从创建的 CSR 中导出 *.pfx。完成后,此 *.pfx 可用于使用 keytool 生成创建密钥库。
谢谢
推荐阅读
- c++ - 为什么 C++ 编译器会在“c:\program files\gnu emacs\include”中查找包含文件?
- fullpage.js - Fullpage.js v3 - 幻灯片重置错误
- c++ - How to reset QApplication::styleSheet for certain buttons in application?
- matlab-guide - Matlab 工具栏 GUI 自定义图标
- php - Omnipay - 空错误消息
- windows - 通过 Bitbucket.org 在 Mac 和 Windows 之间使用 Gate
- spring-boot - 将 HATEOAS 链接映射到实际的 API 链接
- html - Div 低于其兄弟姐妹
- jquery - 如何使用 jquery 从 url 替换 %7C 和 %20?
- google-cloud-platform - GCP Cloud Datalab 所需的权限 (IAM)