android - 同行没有返回证书:cordova-plugin-advanced-http
问题描述
我正在尝试使用插件发送请求:https ://github.com/silkimen/cordova-plugin-advanced-http 。
固定成功,但服务器抛出错误 TLS 连接对等方未发送具有相同证书的证书 cURL 工作正常。
这是代码:
this.http.setServerTrustMode('pinned')
.then(() => {
console.log('[SUCCESS] SSL Pinning Starts!');
})
.catch(() => {
console.log('[ERROR] SSL Pinning Fails!');
});
this.http.get(baseUrl + "/getinfo", {}, {})
.then (resp => {
return resp;
})
.catch (err => {
console.log("ERR " + err);
})
错误:
TLS connection peer did not send a certificate
我正在Android中尝试它。我也必须在 iOS 中执行此操作。
解决方案
推荐阅读
- cmake - 有没有办法复制现有库但能够修改新库?
- kubernetes - 如何通过在golang中传递像kubectl这样的yaml文件来创建kubernetes对象
- python - Python在Outlook中发送带有签名的电子邮件
- java - 提供文件时未正确获取文件扩展名
- python - 从数据框中创建具有条件逻辑的变量
- javascript - 如何将多个文件选择放入数组中以输出
- javascript - 指定属性返回的js递归函数
- python - NotImplementedError:不支持板
- java - 在tomcat服务器中运行war文件时出错
- react-native - 如何将 iOS 本地 URI 转换为路径?