downloadAndUpdateCert方法下面更新证书代码:
ConcurrentHashMap<BigInteger, X509Certificate> merchantCertificates = certificates.get(merchantId);
merchantCertificates.clear();
merchantCertificates.putAll(newCertList);
下面2行代码执行过程中:
merchantCertificates.clear();
这之间如果有其他线程正好需要获取平台证书进行验签,导致获取不到,报验签错误
merchantCertificates.putAll(newCertList);