Scala Playframework 訪問HTTPS網站證書錯誤解決方案

使用Playframework訪問https網站報以下錯誤: java

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

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


正確的解決方案以下: ui



  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 this

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

引用地址: ssl

http://stackoverflow.com/questions/27726968/how-to-use-play-ws-with-ssl get

相關文章
相關標籤/搜索