我面对SSLHandshakeException
Heroku。
此应用程序不是 SSL 应用程序。但是这个应用程序从应用程序内部调用了一个基于 ssl 的 web api。通常,使用 keytool 对 JVM 采用 SSL 证书可以解决此类问题。
但是我如何在 Heroku 上做到这一点?
在这里记录:
2012-06-12T11:08:08+00:00 app[web.1]: Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
2012-06-12T11:08:08+00:00 app[web.1]: at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:324) ~[na:1.6.0_20]
2012-06-12T11:08:08+00:00 app[web.1]: at sun.security.validator.Validator.validate(Validator.java:235) ~[na:1.6.0_20]
2012-06-12T11:08:08+00:00 app[web.1]: at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:147) ~[na:1.6.0_20]
2012-06-12T11:08:08+00:00 app[web.1]: at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:230) ~[na:1.6.0_20]
2012-06-12T11:08:08+00:00 app[web.1]: Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
2012-06-12T11:08:08+00:00 app[web.1]: at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:270) ~[na:1.6.0_20]
2012-06-12T11:08:08+00:00 app[web.1]: at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:197) ~[na:1.6.0_20]
2012-06-12T11:08:08+00:00 app[web.1]: at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:255) ~[na:1.6.0_20]
2012-06-12T11:08:08+00:00 app[web.1]: at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:319) ~[na:1.6.0_20]
2012-06-12T11:08:08+00:00 app[web.1]: at sun.security.validator.Validator.validate(Validator.java:235) ~[na:1.6.0_20]
2012-06-12T11:08:08+00:00 app[web.1]: at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:147) ~[na:1.6.0_20]
2012-06-12T11:08:08+00:00 app[web.1]: at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:224) ~[na:1.6.0_20]