Android 12:Trust anchor for certification path not found

0

【以下的问题经过翻译处理】 你好, 我有一个Android应用程序,已在使用Android 8/9/10/11/12的手机上进行过测试,Android 8/9/10/11手机工作正常,但是我无法在Android 12上收到通知。有人能提供任何建议吗?

我遇到的异常(仅适用于Android 12)! “MqttException(0)-javax.net.ssl.SSLHandshakeException:java.security.cert.CertPathValidatorException:Trust anchor for certification path not found.”

更多信息: https://stackoverflow.com/questions/70163257/mqtt-can-not-connect-to-aws-server

更多信息(2021/12/9): 我使用同一帐户在Amazon Cognito中创建身份池,并设置不同的地区进行测试。如果将区域设置为us-west-2,则MQTT连接失败,如果将区域设置为ap-southeast-1,则MQTT连接成功。这将对身份池产生什么影响?或者有其他建议吗?

(注意:Android 8/9/10/11手机正常,只有Android 12出现错误消息。)

profile picture
专家
已提问 2 年前131 查看次数
1 回答
0

【以下的回答经过翻译处理】 嘿@ pc9705atgmi,Bruno,Jason,我觉得我已经找到了问题。根据https://docs.aws.amazon.com/iot/latest/developerguide/iot-connect-devices.html,类型为iot:Data的旧accountEndpointPrefix不应该使用。它被描述为遗留的“Verisign”端点,很明显它不能与Android 12一起使用。

调用:

aws iot describe-endpoint --endpoint-type iot:Data-ATS

你将得到以-ats结尾的新accountEndpointPrefix(或者你可以将-ats添加到你当前的accountEndpointPrefix)并再试一次。

现在它对我来说运作得非常好。

Goran

profile picture
专家
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则