Skip to content

Conversation

gadfly3173
Copy link
Contributor

@gadfly3173 gadfly3173 commented Jan 21, 2025

Fixes: #3443

94aaff4 中对WxPayConfig进行了修改以解决 fe5430e 引入的问题。但是 loadConfigInputStream(String configString, String configPath, byte[] configContent, String fileName) 中的 configString 从引入项目开始就一直是设计为只处理base64字符串的。见 privateKeyString 等成员变量的注释:

/**
* apiclient_key.pem证书base64编码
*/
private String privateKeyString;

@gadfly3173 gadfly3173 force-pushed the fix/pay-config-string branch from f9010d6 to ba182f3 Compare January 21, 2025 06:36
@gadfly3173
Copy link
Contributor Author

#3482 我做一点额外的说明吧。publicKeyString 等base64配置是 #2617 引入的,相比于原来就有的字节数组的配置,base64的配置更适合将证书放置在nacos、properties配置文件等场景,因为pem证书对格式有严格的要求,需要原样保留换行符和空格。如果可以直接获取到完整证书的string,那么通过 publicKeyContent 来处理即可。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

initApiV3HttpClient() 方法中对privateKeyString处理会导致异常

2 participants