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

java的demo中的双向认证,客户端证书PKCS#8格式的密钥文件无法加载 #146

Open
kliein opened this issue Jun 7, 2024 · 0 comments
Assignees

Comments

@kliein
Copy link

kliein commented Jun 7, 2024

openssl版本:OpenSSL 3.3.1 4 Jun 2024 (Library: OpenSSL 3.3.1 4 Jun 2024)
生成的证书密钥文件格式为:PKCS#8,示例中的只能加载PKCS#1的密钥。
请修改一下示例代码,能够适配两种,或者在生成证书时添加指定版本的参数。

报错信息:
org.bouncycastle.asn1.pkcs.PrivateKeyInfo cannot be cast to org.bouncycastle.openssl.PEMKeyPair

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

2 participants