Android 自签名证书-java.security.NoSuchAlgorithmException:构造实现时出错
我为本地部署创建自己的CA授权。以及APIRest、web和应用程序。所以我的证书在网络上运行良好 在安卓系统中,我一直在以如下方式配置我的Android 自签名证书-java.security.NoSuchAlgorithmException:构造实现时出错,android,ssl,openssl,nativescript,Android,Ssl,Openssl,Nativescript,我为本地部署创建自己的CA授权。以及APIRest、web和应用程序。所以我的证书在网络上运行良好 在安卓系统中,我一直在以如下方式配置我的网络\u security\u config.xml: <?xml version="1.0" encoding="utf-8"?> <network-security-config> <domain-config> <trust-anchors> <cer
网络\u security\u config.xml
:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config>
<trust-anchors>
<certificates src="@raw/myca"/>
<certificates src="system"/>
<certificates src="user"/>
</trust-anchors>
</domain-config>
</network-security-config>
当我运行tns run android
并尝试连接到api时,控制台会显示以下错误:
“error”:{JS:“originalStack”:“error:java.net.SocketException:
java.security.NoSuchAlgorithmException:构造错误
实现(算法:默认,提供程序:AndroidOpenSSL,类:
com.android.org.conscrypt.DefaultSSLContextImpl)\n位于新的
分区警告错误
(file:///data/data/org.nativescript.ngsample/files/app/vendor.js:91593:33)\n
应要求完成
(file:///data/data/org.nativescript.ngsample/files/app/vendor.js:97990:34)\n
在Object.onComplete
(file:///node_modules/@nativescript/core/http/http/request/http request.js:43:0)”
有什么问题吗?这很容易。我的错误是没有阅读文档。我只需要更改mi
security\u network\u config.xml
<domain-config>
<domain includeSubdomains="true">192.168.1.67</domain>
<trust-anchors>
<certificates src="@raw/myca"/>
</trust-anchors>
</domain-config>
192.168.1.67
这很容易。我的错误是没有阅读文档。我只需要更改misecurity\u network\u config.xml
<domain-config>
<domain includeSubdomains="true">192.168.1.67</domain>
<trust-anchors>
<certificates src="@raw/myca"/>
</trust-anchors>
</domain-config>
192.168.1.67
对于这种情况,我们需要包含子域吗?在这种情况下,是的。我们如何知道子域IP地址是什么?对于这种情况,我们需要包含子域吗?在这种情况下,是的。我们如何知道子域IP地址是什么?