我有这个确切的问题,昨天设法解决了。您是正确的,因为它是版本 1 证书,因此不接受根证书。
我首先通过使用 openssl 找出证书链中的哪个证书是版本 1 证书(这会导致错误)来解决问题。
simonevertsson$ openssl s_client -connect my.secure.site.com:443
这给出了证书链。例子:
---
Certificate chain
0 s:/C=SE/ST=Uppsala/L=Uppsala/O=Example AB/CN=my.secure.site.com
i:/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/rpa (c)10/CN=VeriSign Class 3 Secure Server CA - G3
1 s:/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/rpa (c)10/CN=VeriSign Class 3 Secure Server CA - G3
i:/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 2006 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 3 Public Primary Certification Authority - G5
2 s:/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 2006 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 3 Public Primary Certification Authority - G5
i:/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority
3 s:/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority
i:/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority
---
然后我去了VeriSign 根证书下载页面并手动下载了版本 1 证书的 .pem 文件,在我的例子中是第 3 类公共主要证书颁发机构。
下载证书文件后,我只是按照有关添加未知 CA的 Android 开发人员指南进行操作。就这样,错误消失了。