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

[尝试获取p12证书] 是否考虑去掉堆栈打印? #3424

Closed
zhanyan-Ader1y opened this issue Nov 29, 2024 · 2 comments · Fixed by #3428 or #3435
Closed

[尝试获取p12证书] 是否考虑去掉堆栈打印? #3424

zhanyan-Ader1y opened this issue Nov 29, 2024 · 2 comments · Fixed by #3428 or #3435

Comments

@zhanyan-Ader1y
Copy link
Contributor

zhanyan-Ader1y commented Nov 29, 2024

简要描述

在微信支付的 com.github.binarywang.wxpay.config.WxPayConfig#p12ToPem 中, 会尝试获取p12证书. 但尝试性操作却输出了异常堆栈, 是否考虑去掉堆栈的打印?

模块版本情况

  • WxJava 模块名: wxpay
  • WxJava 版本号: latest

日志

com.github.binarywang.wxpay.exception.WxPayException: 请确保证书文件地址【p12证书】或者内容已配置
	at com.github.binarywang.wxpay.config.WxPayConfig.loadConfigInputStream(WxPayConfig.java:382)
	at com.github.binarywang.wxpay.config.WxPayConfig.p12ToPem(WxPayConfig.java:456)
	at com.github.binarywang.wxpay.config.WxPayConfig.initApiV3HttpClient(WxPayConfig.java:291)
@zhanyan-Ader1y zhanyan-Ader1y changed the title [尝试获取p12证书] 是否考虑去掉堆栈报错? [尝试获取p12证书] 是否考虑去掉堆栈打印? Nov 29, 2024
@binarywang
Copy link
Owner

欢迎直接提交代码来展现你的想法

@HaalandCR
Copy link

HaalandCR commented Dec 10, 2024

这个pr有问题,本来loadConfigInputStream就是从keyString、keyPath、keyContent三个里面读取inputStream,只要任何一个有值就能读取到。现在加的这个判断导致必须keyPath有值才能走下,只设置keyString或keyContent的情况下直接返回了null,影响使用,并不是所有人都使用keyPath来设置证书
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants