ionic framework/ionic native http:ssl客户端身份验证

ionic framework/ionic native http:ssl客户端身份验证,ssl,ionic-framework,https,ionic-native,mutual-authentication,Ssl,Ionic Framework,Https,Ionic Native,Mutual Authentication,我指的是这个问题: 如何在ionic框架内实现基于ssl客户端的身份验证交互tls?我正在使用ionic原生http插件。我将.cer文件放在platforms/android/asset文件夹中 this.http.acceptAllCerts(true); this.http.enableSSLPinning(false); this.http.get('https://someip/backend/all', {}, {}) .then(data => { consol

我指的是这个问题:

如何在ionic框架内实现基于ssl客户端的身份验证交互tls?我正在使用ionic原生http插件。我将.cer文件放在platforms/android/asset文件夹中

this.http.acceptAllCerts(true);
this.http.enableSSLPinning(false);

this.http.get('https://someip/backend/all', {}, {})
  .then(data => {
    console.log("data",data)
  })
  .catch(error => {
    console.log("error",error);
  });
目前,http请求没有随每个请求一起发送所需的ssl证书

<html>
<head><title>400 No required SSL certificate was sent</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<center>No required SSL certificate was sent</center>
<hr><center>nginx/1.10.3 (Ubuntu)</center>
</body>
</html>
全球方案:

cordova (Cordova CLI) : not installed
@ionic/app-scripts : 3.1.8
Cordova Platforms  : android 6.3.0 browser 5.0.0
Ionic Framework    : ionic-angular 3.9.2
本地套餐:

cordova (Cordova CLI) : not installed
@ionic/app-scripts : 3.1.8
Cordova Platforms  : android 6.3.0 browser 5.0.0
Ionic Framework    : ionic-angular 3.9.2
系统:

Android SDK Tools : 26.1.1
Node              : v6.11.3
npm               : 3.10.10
OS                : Windows 10
环境变量:

ANDROID_HOME : C:\Users\myname\Android\sdk
杂项:


对于Android,我在安装插件Cordova client cert authentication的情况下使用Cordova,这很快就奏效了:在安装插件并编译应用程序后,它会在应用程序启动后立即请求使用哪个证书,请求也会按预期工作


但这确实需要您在手机的身份存储中安装证书,这迫使您在设备上启用锁定屏幕。

您需要添加更多信息请使用ionic info=>您要使用哪个平台?我添加了请求的ionic info输出,我正在尝试构建一个android apk,它使用基于客户端的ssl身份验证。问题是如何发送包含my certificate格式的http请求。p12或其他我可以确认的内容,使用cordova客户端证书验证插件解决了问题