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

下载证书报错 #1

Closed
zhoutou123 opened this issue Oct 14, 2019 · 2 comments
Closed

下载证书报错 #1

zhoutou123 opened this issue Oct 14, 2019 · 2 comments

Comments

@zhoutou123
Copy link

zhoutou123 commented Oct 14, 2019

Exception in thread "main" picocli.CommandLine$ExecutionException: Error while running command (com.elias.CertificateDownloader@43b0ade): java.lang.IllegalArgumentException: java.security.InvalidKeyException: Illegal key size
	at picocli.CommandLine.executeUserObject(CommandLine.java:1738)
	at picocli.CommandLine.access$900(CommandLine.java:145)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2101)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2068)
	at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1928)
	at picocli.CommandLine.parseWithHandlers(CommandLine.java:2282)
	at picocli.CommandLine.run(CommandLine.java:2740)
	at picocli.CommandLine.run(CommandLine.java:2677)
	at com.elias.CertificateDownloader.main(CertificateDownloader.java:155)
Caused by: java.lang.IllegalArgumentException: java.security.InvalidKeyException: Illegal key size
	at com.wechat.pay.contrib.apache.httpclient.util.AesUtil.decryptToString(AesUtil.java:42)
	at com.elias.CertificateDownloader.decryptAndValidate(CertificateDownloader.java:118)
	at com.elias.CertificateDownloader.downloadCertificate(CertificateDownloader.java:103)
	at com.elias.CertificateDownloader.run(CertificateDownloader.java:67)
	at picocli.CommandLine.executeUserObject(CommandLine.java:1729)
	... 8 more
Caused by: java.security.InvalidKeyException: Illegal key size
	at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1039)
	at javax.crypto.Cipher.implInit(Cipher.java:805)
	at javax.crypto.Cipher.chooseProvider(Cipher.java:864)
	at javax.crypto.Cipher.init(Cipher.java:1396)
	at javax.crypto.Cipher.init(Cipher.java:1327)
	at com.wechat.pay.contrib.apache.httpclient.util.AesUtil.decryptToString(AesUtil.java:35)
	... 12 more

apiV3key为32位字符串

@xy-peng
Copy link
Collaborator

xy-peng commented Oct 14, 2019

@Gaoxu97
Copy link

Gaoxu97 commented Apr 24, 2022

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
Development

No branches or pull requests

3 participants