让 Jetty 发送正确的 SSL 证书
我已经创建了一个密钥库并使用 keytool 将我的证书(由官方 CA 颁发)导入到其中,没有任何问题。
接下来,我启动 Jetty(v. 8.0.0 M3)并使用 -DjettySslKeyStoreFile
参数为其提供密钥库的位置,Jetty 启动正常,也在端口 443 上运行。
但是,当我访问 https://site.com 时,我获得的证书无效。检查证书时,Jetty 似乎转发了我在生成密钥库(使用 keytool -genkey)时输入的信息,而不是证书本身包含的信息。
我需要做什么才能让 Jetty 发送在密钥库中找到的证书,而不是密钥库中存储的数据?我找不到任何关于此的文档。我希望您在将证书插入密钥库时为其指定一个特定的别名,或者您可以配置 Jetty 应提供的别名。
I have created a Keystore and imported my certificate (issued by an official CA) into it using keytool, no problems there.
Next, I start up Jetty (v. 8.0.0 M3) and give it the location of the keystore using the -DjettySslKeyStoreFile
parameter, Jetty starts up fine, runs on port 443 too.
When I go to https://site.com however, the certificate I get is invalid. When examining the certificate, it seems Jetty forwards the information I entered when generating the keystore (using keytool -genkey), instead of the information contained in the certificate itself.
What do I need to do so that Jetty sends the certificate found inside the keystore, instead of the data stored in the keystore? I wasn't able to find any documentation on this. I would expect that you'd give the certificate a specific alias when inserting it into the keystore, or that you can configure what alias Jetty should serve.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我们从来没有真正弄清楚这一点。相反,我们在它前面选择了一个 nginx SSL 代理,它在功能上也同样有效,并且我们也从托管方获得了支持和设置。
We never actually figured this out. Instead, we went for an nginx SSL proxy in front of it, which - functionally - works just as well, and with this we get support and setup from our hosting party as well.