我是靠谱客的博主 大意魔镜,这篇文章主要介绍Scala Playframework 访问HTTPS网站证书错误解决方案,现在分享给大家,希望可以做个参考。

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

使用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


正确的解决方案如下:



  1. 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

  1. 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

转载于:https://my.oschina.net/gouqizi/blog/634694

最后

以上就是大意魔镜最近收集整理的关于Scala Playframework 访问HTTPS网站证书错误解决方案的全部内容,更多相关Scala内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(129)

评论列表共有 0 条评论

立即
投稿
返回
顶部