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
Amazon web services CodenameOne移动应用程序使用真实证书(非自签名)连接到https服务器时引发SSL异常_Amazon Web Services_Ssl_Codenameone - Fatal编程技术网

Amazon web services CodenameOne移动应用程序使用真实证书(非自签名)连接到https服务器时引发SSL异常

Amazon web services CodenameOne移动应用程序使用真实证书(非自签名)连接到https服务器时引发SSL异常,amazon-web-services,ssl,codenameone,Amazon Web Services,Ssl,Codenameone,我有一个AmazonAWS环境,运行一个带有https端点的SpringBoot服务器应用程序。()服务器上已安装www.myapp.com的真实(非自签名)证书 当在真实设备(通过OTA电子邮件安装)上从Android发行版应用程序连接时,我看到了例外情况: Exception: javax.net.ssl.SSLHandshakeException - java.security.cert.CertPathValidatorException: Trust anchor for cert

我有一个AmazonAWS环境,运行一个带有https端点的SpringBoot服务器应用程序。()服务器上已安装www.myapp.com的真实(非自签名)证书

当在真实设备(通过OTA电子邮件安装)上从Android发行版应用程序连接时,我看到了例外情况:

Exception: javax.net.ssl.SSLHandshakeException - 
java.security.cert.CertPathValidatorException: Trust anchor for 
certification path not found.
javax.net.ssl.SSLHandshakeException: 
java.security.cert.CertPathValidatorException: Trust anchor for 
certification path not found.
在模拟器中,我将真实站点证书添加到IntellijJavaCacerts文件中,效果很好。在模拟器中,我对AWS盒的所有https调用都可以正常工作

在构建Android应用程序时,我将真实证书添加到密钥库,并通过Android设置的CN1首选项指定密钥库。这构建得很好,但在实际设备上运行时会生成上述异常

通过CN1使用自签名证书并部署在真实设备上也以同样的方式失败


这里我遗漏了什么?

Android构建中的密钥库用于签名,因此向其中添加证书是不相关的,因为一旦APK被签名,它就不会改变任何东西。如果Android或Apple无法使用该证书,那么它就不是一个好的证书。如果您在Android上打开本机浏览器并正确加载站点,那么它也应该与应用程序一起工作。

如果我在Android上打开chrome,站点将加载,挂锁将关闭ie secure。点击chrome报告中的挂锁:“chrome验证Starfield Secure Certificate Authority-G2颁发了此网站证书”“您到www.xxxxx.com:8443的连接使用现代密码套件进行了加密…”更新:该应用程序在ios设备上运行,但在android上仍然失败。对Starfield CA做了更多的研究,发现了一系列关于java不同版本的jdk在cacerts中缺少Starfield的证书等问题。我决定从另一个CA购买另一个证书,现在看起来一切都正常了——在android和ios上都是如此。Thx一如既往地寻求帮助和澄清。