fix: 修复多证书初始化的问题

This commit is contained in:
felord
2021-03-25 13:50:08 +08:00
parent ae618da2d3
commit 538e11dabe

View File

@@ -56,9 +56,9 @@ public class KeyPairFactory {
if (store == null) {
synchronized (lock) {
store = KeyStore.getInstance("PKCS12");
store.load(resource.getInputStream(), pem);
}
}
store.load(resource.getInputStream(), pem);
}
X509Certificate certificate = (X509Certificate) store.getCertificate(keyAlias);
certificate.checkValidity();