Skip to content

CertificatesManager的downloadAndUpdateCert更新证书存在并发问题 #221

@todoo

Description

@todoo
downloadAndUpdateCert方法下面更新证书代码:
 ConcurrentHashMap<BigInteger, X509Certificate> merchantCertificates = certificates.get(merchantId);
merchantCertificates.clear();
merchantCertificates.putAll(newCertList);

下面2行代码执行过程中:
merchantCertificates.clear();
这之间如果有其他线程正好需要获取平台证书进行验签,导致获取不到,报验签错误
merchantCertificates.putAll(newCertList);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions