【发布时间】:2020-03-07 06:04:02
【问题描述】:
我目前正在使用需要集成 Mobile First 的 React Native。我尝试 ping 服务器,但它会引发此错误。
java.security.cert.CertPathValidatorException: Trust anchor for
certification path not found.
服务器证书不是由 CA 签名的,而是自签名的。
我搜索并发现将自签名证书添加到信任锚 (https://developer.android.com/training/articles/security-config) 应该可以解决问题。将证书安装到设备上也可以解决问题。
不幸的是,证书本身也有问题,所以我无法使用上述解决方案使其工作。
我知道正确的解决方案是在服务器端安装有效且受信任的证书,但我们仍处于开发模式。我想问一下是否有办法忽略 SSL 证书错误?
顺便说一句,我正在使用 MobileFirst SDK 的功能,特别是 WLAuthorizationManager.login() 和 WLAuthorizationManager.obtainAccessToken()
【问题讨论】:
标签: android react-native ibm-mobilefirst mobilefirst-adapters