报错:SSLHandshakeException: server certificate change is restricted during renegotiation
1.背景运行得很完美的代码,突然访问第三方接口就报错SSLHandshakeException: server certificate change is restricted during renegotiation2.处理办法在请求第三方接口前添加如下配置System.setProperty("jdk.tls.allowUnsafeServerCertChange", "true");Syst
·
1.背景
运行得很完美的代码,突然访问第三方接口就报错
SSLHandshakeException: server certificate change is restricted during renegotiation
2.处理办法
在请求第三方接口前添加如下配置
System.setProperty("jdk.tls.allowUnsafeServerCertChange", "true");
System.setProperty("sun.security.ssl.allowUnsafeRenegotiation", "true");
System.setProperty("jdk.tls.client.protocols", "TLSv1,TLSv1.1,TLSv1.2");
3.完美
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐

所有评论(0)