Play 框架没有看到 SSL Intermediate/chain 证书
Play framework doesn't see SSL Intermediate/chain certificate
我创建了包含 6 个条目的 JKS 密钥库:
openssl pkcs12 -export -in myapp.cert -inkey myapp.key -name myapp.pl -out myapp.p12
keytool -importkeystore -destkeystore myapp.jks -srckeystore myapp.p12 -srcstoretype PKCS12
keytool -import -alias bundle -trustcacerts -file az.pem -keystore myapp.jks
keytool -list -keystore myapp.jks
Enter keystore password:
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 6 entries
当我 运行 它在我的服务器上时,它没有看到任何中间链证书。在某些计算机上,它可以正常工作,因为它具有所有证书,在其他计算机上:
The certificate is not trusted because the issuer certificate is unknown. The server might not be sending the appropriate intermediate certificates. An additional root certificate may need to be imported. Error code: SEC_ERROR_UNKNOWN_ISSUER
我已经使用在线工具进行了检查,它看到了我的证书,但问题出在中间链证书上。
我的配置:
play {
crypto.secret="%APPLICATION_SECRET%"
# Certyficate SSL
server.https.keyStore {
path = "/etc/bodyfit-server/myapp.jks"
type = "JKS"
password = "12345678"
}
}
我使用 play framework 2.5 和 Netty,有什么想法吗?
我找到了解决方案,在转换为 PKCS12 格式后它可以正常工作
keytool -importkeystore -srckeystore myapp.jks -destkeystore myapp.p12 -srcstoretype JKS - deststoretype PKCS12 -deststorepass *******
当然,在配置中,你必须改变密钥格式
我创建了包含 6 个条目的 JKS 密钥库:
openssl pkcs12 -export -in myapp.cert -inkey myapp.key -name myapp.pl -out myapp.p12
keytool -importkeystore -destkeystore myapp.jks -srckeystore myapp.p12 -srcstoretype PKCS12
keytool -import -alias bundle -trustcacerts -file az.pem -keystore myapp.jks
keytool -list -keystore myapp.jks
Enter keystore password:
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 6 entries
当我 运行 它在我的服务器上时,它没有看到任何中间链证书。在某些计算机上,它可以正常工作,因为它具有所有证书,在其他计算机上:
The certificate is not trusted because the issuer certificate is unknown. The server might not be sending the appropriate intermediate certificates. An additional root certificate may need to be imported. Error code: SEC_ERROR_UNKNOWN_ISSUER
我已经使用在线工具进行了检查,它看到了我的证书,但问题出在中间链证书上。
我的配置:
play {
crypto.secret="%APPLICATION_SECRET%"
# Certyficate SSL
server.https.keyStore {
path = "/etc/bodyfit-server/myapp.jks"
type = "JKS"
password = "12345678"
}
}
我使用 play framework 2.5 和 Netty,有什么想法吗?
我找到了解决方案,在转换为 PKCS12 格式后它可以正常工作
keytool -importkeystore -srckeystore myapp.jks -destkeystore myapp.p12 -srcstoretype JKS - deststoretype PKCS12 -deststorepass *******
当然,在配置中,你必须改变密钥格式