mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-06-28 13:16:19 +08:00
🎨 #3424 【微信支付】加载证书前增加校验,减少不必要的异常日志输出
This commit is contained in:
parent
915f10157f
commit
3f3c37d286
@ -449,7 +449,7 @@ public class WxPayConfig {
|
|||||||
*/
|
*/
|
||||||
private Object[] p12ToPem() {
|
private Object[] p12ToPem() {
|
||||||
String key = getMchId();
|
String key = getMchId();
|
||||||
if (StringUtils.isBlank(key)) {
|
if (StringUtils.isBlank(key) || StringUtils.isBlank(this.getKeyPath())) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -466,7 +466,7 @@ public class WxPayConfig {
|
|||||||
X509Certificate x509Certificate = (X509Certificate) certificate;
|
X509Certificate x509Certificate = (X509Certificate) certificate;
|
||||||
return new Object[]{privateKey, x509Certificate};
|
return new Object[]{privateKey, x509Certificate};
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("加载证书时发生异常", e);
|
log.error("加载p12证书时发生异常", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user