Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 9.1k
从base64字符串加载密钥时报错 #3765
Copy link
Copy link
Closed
Description
Metadata
Metadata
Assignees
Labels
No labels
版本:4.7.8.B
在构建WxPayConfig配置时,如果设置base64密钥串,读取时会出现base64解码异常。定位源码,发现问题出在WxPayConfig中的方法:
调用this.loadConfigInputStream 获取 inputStream,再执行 merchantPrivateKey = PemUtils.loadPrivateKey(keyInputStream);
在 PemUtils.loadPrivateKey 对流再次进行base64解码