首页 > 解决方案 > 同行没有返回证书: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 中执行此操作。

标签: androidopensslssl-certificateionic5

解决方案


推荐阅读