volcengine / volc-sdk-java

Apache License 2.0
49 stars 32 forks source link

Update HttpClientFactory.java #16

Open lizhq opened 7 months ago

lizhq commented 7 months ago

JDK1.8 , 使用 MaasServiceImpl 报错 , 报错如下, 根因是 maas-api.ml-platform-cn-beijing.volces.com 域名对JDK来说不可信。 (当然可以把证书导入进Jre来解决,但是这里隐藏着证书过期后带来的风险,不确定证书何时更换或过期。改改动来取消证书验证) javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)