在线观看视频的免费网站,合肥网站建设行情,太原0元网站建设,企业网站建设有什么要求play框架配置 拦截器我花了几个小时试图使它起作用#xff0c;最后#xff0c;问题是我自己没有使用keytool生成CSR#xff08;证书请求#xff09;。 当我尝试通过https访问Play时#xff0c;我一直收到此错误#xff1a; javax.net.ssl.SSLPeerUnverifiedException最后问题是我自己没有使用keytool生成CSR证书请求。 当我尝试通过https访问Play时我一直收到此错误 javax.net.ssl.SSLPeerUnverifiedException对等方未通过身份验证 问题最终是我创建并导入SSL证书的密钥库没有用于CSR证书请求的公钥。 因此这里是使用godaddy .com生成SSL证书并使用Play Framework 2.1进行安装的快速版本。 请遵循godaddy .com的这些指示来生成CSR如下所示 首先生成这样的密钥对 keytool -keysize 2048 -genkey -alias tomcat -keyalg RSA -keystore tomcat.keystore 然后生成CSR keytool -certreq -alias tomcat -file csr.txt -keystore tomcat.keystore 使用企业社会责任申请证书 将中间证书捆绑包和生成的证书添加到您的密钥库中。 注意请确保这与您在步骤1中生成私钥的密钥库相同 keytool -import -alias intermed -keystore tomcat.keystore -trustcacerts -file gd_bundle.crt
keytool -import -alias tomcat -keystore tomcat.keystore -trustcacerts -file mycert.crt 将mycert.crt替换为新GoDaddy证书的文件名和位置 最后按照在Play 2.1中配置https的说明进行操作 http://www.playframework.com/doc um tn i o / n / 2..2..1 / c / o / i / g / u / i / g / htps 与自行生成的键配合使用效果很好我创建了一个Shell脚本用于使用正确的参数启动Play # script for starting play in production with SSL and the keystore
target/start -Dhttps.port443 -Dhttps.keyStore/Users/bp/mypath/tomcat.keystore -Dhttps.keyStorePassworditl80809 注意您需要事先执行“ play dist”以便将当前软件编译到目标子目录中的发行版中。 参考来自Poornerd博客的JCG合作伙伴 Brian Porter的如何使用https的Play Framework配置SSL证书 。 翻译自: https://www.javacodegeeks.com/2014/01/how-to-configure-an-ssl-certificate-with-play-framework-for-https.htmlplay框架配置 拦截器