Is there a java setting for disabling certificate validation?

前端 未结 7 1702
死守一世寂寞
死守一世寂寞 2020-12-01 02:08

I received this error while trying to start up an application:

Sun.security.validator.ValidatorException: PKIX path validation failed: 
java.security.cert.C         


        
相关标签:
7条回答
  • 2020-12-01 02:35

    Not exactly a setting but you can override the default TrustManager and HostnameVerifier to accept anything. Not a safe approach but in your situation, it can be acceptable.

    Complete example : Fix certificate problem in HTTPS

    0 讨论(0)
提交回复
热议问题