Google 如何修复 X509TrustManager 实施方式不安全的应用

来源:互联网 发布:程序员未来的发展趋势 编辑:程序博客网 时间:2024/06/05 09:59

前段时间在google市场上面更新APP,解决被拒了。
这里写图片描述

google给出的解决方案是
这里写图片描述

最后我的解决方法是

 public void checkServerTrusted(X509Certificate[] chain, String authType)                        throws CertificateException {                    try {                        chain[0].checkValidity();                    } catch (Exception e) {                        throw new CertificateException("Certificate not valid or trusted.");                    }                }

好像过不了多久google就会完全拒绝使用了X509TrustManager的APP了,所以希望大家尽早替换。

0 0