解决融云 SDK 4.0 版本配置 https 导航报 SSLHandshakeException
我们公司最近使用融云 IM 进行集成开发. 我们是私有云部署, 导航是通过接口进行设置的. 是 Https 的.
之前我们是使用的2.x 版本, 使用下面接口配置一下即可.
RongIMClient.getInstance().enableHttpsSelfCertificate(false);
但是最近我们升级融云到 4.0 版本. 突然发现连接不上了. 日志中报
javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
这个错误.
于是咨询融云技术支持, 得知 4.0 需要自己进行证书验证.
需在 application 中添加即可.