🎨 修复 94aaff4 引入的错误读取证书的问题

This commit is contained in:
GadflyFang 2025-01-21 18:44:33 +08:00 committed by GitHub
parent 8e5ee97378
commit 1e003ee571
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,6 +14,7 @@ import java.security.PrivateKey;
import java.security.PublicKey; import java.security.PublicKey;
import java.security.cert.Certificate; import java.security.cert.Certificate;
import java.security.cert.X509Certificate; import java.security.cert.X509Certificate;
import java.util.Base64;
import java.util.Optional; import java.util.Optional;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import lombok.Data; import lombok.Data;
@ -371,7 +372,7 @@ public class WxPayConfig {
if (configContent != null) { if (configContent != null) {
inputStream = new ByteArrayInputStream(configContent); inputStream = new ByteArrayInputStream(configContent);
} else if (StringUtils.isNotEmpty(configString)) { } else if (StringUtils.isNotEmpty(configString)) {
configContent = configString.getBytes(StandardCharsets.UTF_8); configContent = Base64.getDecoder().decode(configString);
inputStream = new ByteArrayInputStream(configContent); inputStream = new ByteArrayInputStream(configContent);
} else { } else {
if (StringUtils.isBlank(configPath)) { if (StringUtils.isBlank(configPath)) {