Skip to content
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

java.lang.IllegalArgumentException: java.security.cert.CertificateException: Could not parse certificate: java.io.IOException: Empty input #85

Closed
chengling235 opened this issue Dec 20, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@chengling235
Copy link

错误描述

java.lang.IllegalArgumentException: java.security.cert.CertificateException: Could not parse certificate: java.io.IOException: Empty input
at com.wechat.pay.java.core.util.PemUtil.loadX509FromStream(PemUtil.java:114)
at com.wechat.pay.java.core.util.PemUtil.loadX509FromString(PemUtil.java:172)
at com.wechat.pay.java.core.notification.RSANotificationConfig$Builder.certificates(RSANotificationConfig.java:64)
at com.mineway.crm.service.pay.WxPayService.getDecryptObject(WxPayService.java:139)
at com.mineway.crm.service.impl.OrderServiceImpl.payNotify(OrderServiceImpl.java:276)

重现bug的步骤

java.lang.IllegalArgumentException: java.security.cert.CertificateException: Could not parse certificate: java.io.IOException: Empty input
at com.wechat.pay.java.core.util.PemUtil.loadX509FromStream(PemUtil.java:114)
at com.wechat.pay.java.core.util.PemUtil.loadX509FromString(PemUtil.java:172)
at com.wechat.pay.java.core.notification.RSANotificationConfig$Builder.certificates(RSANotificationConfig.java:64)
at com.mineway.crm.service.pay.WxPayService.getDecryptObject(WxPayService.java:139)
at com.mineway.crm.service.impl.OrderServiceImpl.payNotify(OrderServiceImpl.java:276)

预期行为

java.lang.IllegalArgumentException: java.security.cert.CertificateException: Could not parse certificate: java.io.IOException: Empty input
at com.wechat.pay.java.core.util.PemUtil.loadX509FromStream(PemUtil.java:114)
at com.wechat.pay.java.core.util.PemUtil.loadX509FromString(PemUtil.java:172)
at com.wechat.pay.java.core.notification.RSANotificationConfig$Builder.certificates(RSANotificationConfig.java:64)
at com.mineway.crm.service.pay.WxPayService.getDecryptObject(WxPayService.java:139)
at com.mineway.crm.service.impl.OrderServiceImpl.payNotify(OrderServiceImpl.java:276)

导致错误的代码片段

No response

操作系统

macOS

Java 版本

Java8

wechatpay-java 版本

0.2.2

其他信息

No response

@chengling235 chengling235 added the bug Something isn't working label Dec 20, 2022
@chengling235
Copy link
Author

是传平台证书序列号吗

@xy-peng xy-peng closed this as completed Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants