您的位置:首页 > 理论基础 > 计算机网络

Scala Playframework 访问HTTPS网站证书错误解决方案

2016-03-10 17:28 579 查看
使用Playframework访问https网站报如下错误:

Cause: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Cause: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

正确的解决方案如下:

Make sure you have added your Certificate to your trust-store like this:

keytool -import -trustcacerts -keystore {JAVA_HOME}/jre/lib/security/cacerts -noprompt -alias -file {CORRECT_PATH}/what_ever.crt

If still the problem exists, set the path directly by setting java parameters in your execution command line like this:

-Djavax.net.ssl.trustStore={JAVA_HOME}/jre/lib/security/cacerts

引用地址:

http://stackoverflow.com/questions/27726968/how-to-use-play-ws-with-ssl
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: