8000 bug: #3424 [微信支付]尝试加载p12证书前校验path, 避免path为空时加载失败打印堆栈 by zhanyan-Ader1y · Pull Request #3428 · binarywang/WxJava · GitHub
[go: up one dir, main page]

Skip to content

bug: #3424 [微信支付]尝试加载p12证书前校验path, 避免path为空时加载失败打印堆栈 #3428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ private InputStream loadConfigInputStream(String configPath) throws WxPayExcepti
*/
private Object[] p12ToPem() {
String key = getMchId();
if (StringUtils.isBlank(key)) {
if (StringUtils.isBlank(key) || StringUtils.isBlank(this.getKeyPath())) {
return null;
}

Expand All @@ -466,7 +466,7 @@ private Object[] p12ToPem() {
X509Certificate x509Certificate = (X509Certificate) certificate;
return new Object[]{privateKey, x509Certificate};
} catch (Exception e) {
log.error("加载证书时发生异常", e);
log.error("加载p12证书时发生异常", e);
}

return null;
Expand Down
0