如何使用 Grails 设置 SSL?

发布于 2024-11-04 20:14:26 字数 1077 浏览 0 评论 0原文

如何使用 Grails 设置 SSL?我们拥有来自提供商的签名证书,并尝试在 .grails/1.3.7/ssl/keystore 下创建密钥库。只需输入密钥,我们就可以启动 grails 并得到:

Caused by: javax.net.ssl.SSLException: No available certificate or key corresponds to the SSL cipher suites which are enabled.
       at sun.security.ssl.SSLServerSocketImpl.checkEnabledSuites(SSLServerSocketImpl.java:327)
       at sun.security.ssl.SSLServerSocketImpl.accept(SSLServerSocketImpl.java:272)
       at org.apache.tomcat.util.net.jsse.JSSESocketFactory.checkConfig(JSSESocketFactory.java:742)

也许我们必须使用不同的命令导入 .crt 文件?我使用:

keytool -import -v -trustcacerts -alias riseup.org.nz -file /etc/ssl/telethon/telethon.crt

当我使用riseup.org.nz以外的别名时,它抱怨别名与crt不匹配。

运行命令后,它确实询问我是否信任该信息,这让我想到:

注意:导入证书之前不需要执行 -printcert 命令,因为在将证书添加到密钥库中的受信任证书列表之前,-import 命令会打印出证书信息并提示您验证一下。

来自: http://download.oracle.com/javase/1.3 /docs/tooldocs/win32/keytool.html

How do you setup SSL with Grails? We have our signed certificate from our provider, and have tried creating a keystore under .grails/1.3.7/ssl/keystore. With just putting our key in, we start grails and get:

Caused by: javax.net.ssl.SSLException: No available certificate or key corresponds to the SSL cipher suites which are enabled.
       at sun.security.ssl.SSLServerSocketImpl.checkEnabledSuites(SSLServerSocketImpl.java:327)
       at sun.security.ssl.SSLServerSocketImpl.accept(SSLServerSocketImpl.java:272)
       at org.apache.tomcat.util.net.jsse.JSSESocketFactory.checkConfig(JSSESocketFactory.java:742)

Maybe we have to import the .crt file with a different command? I used:

keytool -import -v -trustcacerts -alias riseup.org.nz -file /etc/ssl/telethon/telethon.crt

When I use and alias other than riseup.org.nz, it complains the alias doesn't match the crt.

After running the command, it does ask me if I trust the information, which makes me think of:

Note: it is not required that you execute a -printcert command prior to importing a certificate, since before adding a certificate to the list of trusted certificates in the keystore, the -import command prints out the certificate information and prompts you to verify it.

from: http://download.oracle.com/javase/1.3/docs/tooldocs/win32/keytool.html

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文