gpt4 book ai didi

react 原生 : self-signed certification implementation

转载 作者:行者123 更新时间:2023-12-04 22:42:27 28 4
gpt4 key购买 nike

你知道 的正确工作吗?获取电话自签证书在 native 应用程序中?
使用经典的 fetch :

TypeError: Request failed
rn-fetch-blob拿来 :
[Error: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.]
一个正常工作的解决方案是忽略认证,但这当然不安全。
此代码位于 index.js文件应用程序。
const Fetch = RNFetchBlob.polyfill.Fetch
window.fetch = new Fetch({
trusty: true
}).build()
我查看了另一个帖子,例如 this !

最佳答案

我用 react-native-ssl-pinning ,与 一起工作正常证书固定 .
真正的问题来自服务器证书的错误安装。

关于 react 原生 : self-signed certification implementation,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66034404/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com