Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/218.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 自签名证书-java.security.NoSuchAlgorithmException:构造实现时出错_Android_Ssl_Openssl_Nativescript - Fatal编程技术网

Android 自签名证书-java.security.NoSuchAlgorithmException:构造实现时出错

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

我为本地部署创建自己的CA授权。以及APIRest、web和应用程序。所以我的证书在网络上运行良好

在安卓系统中,我一直在以如下方式配置我的
网络\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

这很容易。我的错误是没有阅读文档。我只需要更改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

对于这种情况,我们需要
包含子域吗?在这种情况下,是的。我们如何知道子域IP地址是什么?对于这种情况,我们需要
包含子域吗?在这种情况下,是的。我们如何知道子域IP地址是什么?