FISCO-BCOS / FISCO-BCOS/web3sdk

加载pem账号文件时报错

Open
#385 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
122
Forks
81
PR merge metrics
No merged PRs in 30d

Description

加载本地.pem文件时报错,报错信息如下:`java.lang.ClassCastException: org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPrivateKey cannot be cast to org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPrivateKey
at org.fisco.bcos.web3j.crypto.ECKeyPair.create(ECKeyPair.java:52)
at org.fisco.bcos.web3j.crypto.Keys.createEcKeyPair(Keys.java:59)`

使用的是最新版的web3sdk, maven的方式依赖的

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the local .pem loading failure with the Maven dependency setup, then inspect org.fisco.bcos.web3j.crypto.ECKeyPair.create at ECKeyPair.java:52 and Keys.createEcKeyPair at Keys.java:59. Done means the same account file loads without the reported ClassCastException.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
cryptography
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.