Skip to content

从base64字符串加载密钥时报错 #3765

@wangzhengzhen

Description

@wangzhengzhen

版本:4.7.8.B

在构建WxPayConfig配置时,如果设置base64密钥串,读取时会出现base64解码异常。定位源码,发现问题出在WxPayConfig中的方法:

Image Image

调用this.loadConfigInputStream 获取 inputStream,再执行 merchantPrivateKey = PemUtils.loadPrivateKey(keyInputStream);

Image

在 PemUtils.loadPrivateKey 对流再次进行base64解码

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions