java – eclipse中的SSL调试

前端之家收集整理的这篇文章主要介绍了java – eclipse中的SSL调试前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
运行 Eclipse应用程序时出现以下错误
  1. javax.net.ssl.SSLHandshakeException:
  2. sun.security.validator.ValidatorException: PKIX path building Failed:
  3. sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

我想在eclipse中打开SSL调试,以告诉导致问题的URL.或者是否有更好的解决方案来调试此问题?

解决方法

在运行或调试时尝试使用以下参数.
  1. -Djavax.net.debug=ssl

把这个参数放到Debug / Run配置 – >参数 – >放入VM参数.检查程序参数和vm参数here之间的区别.

如果您想更具体,可以指定如下

  1. record enable per-record tracing
  2. handshake print each handshake message

对于前

  1. -Djavax.net.debug=ssl:record

有关更多信息,请参阅this链接

猜你在找的Java相关文章