1
0
mirror of synced 2026-02-09 04:07:52 +08:00

🐛 #3825 【微信支付】修复初始化api v3请求时证书序列号值生成条件错误的问题

This commit is contained in:
夏沫浅微凉
2025-12-27 21:10:39 +08:00
committed by GitHub
parent 6504f5d82c
commit db15aec8de

View File

@@ -343,7 +343,7 @@ public class WxPayConfig {
certificate = (X509Certificate) objects[1];
this.certSerialNo = certificate.getSerialNumber().toString(16).toUpperCase();
}
if (certificate == null && StringUtils.isBlank(this.getCertSerialNo()) && (StringUtils.isNotBlank(this.getPrivateCertPath()) || StringUtils.isNotBlank(this.getPrivateCertString())) || this.getPrivateCertContent() != null) {
if (certificate == null && StringUtils.isBlank(this.getCertSerialNo()) && (StringUtils.isNotBlank(this.getPrivateCertPath()) || StringUtils.isNotBlank(this.getPrivateCertString()) || this.getPrivateCertContent() != null)) {
try (InputStream certInputStream = this.loadConfigInputStream(this.getPrivateCertString(), this.getPrivateCertPath(),
this.privateCertContent, "privateCertPath")) {
certificate = PemUtils.loadCertificate(certInputStream);