解决错误Algorithm constraints check failed on disabled algorithm: secp256k1

最近在用FISCO BCOS搭建私链来做项目,本地连我们自己搭建的测试环境FISCO BCOS时,报了些莫名其妙的错,连自己电脑搭建的一点也没问题,证书也都是按环境拷贝的;

关键错误信息如下:

Caused by: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: Algorithm constraints check failed on disabled algorithm: secp256k1

Caused by: javax.net.ssl.SSLHandshakeException: General OpenSslEngine problem

Error: try to connect nodes with both ecdsa and sm context failed

2022-07-13 16:55:46.352|ERROR-[]-[====> init channel network error, org.fisco.bcos.sdk.network.NetworkException:

TRACE INFORMATION:
STEP1: try to connect nodes with ecdsa context…
STEP1-1: Load certificates for ecdsa context success…
STEP1 Result: try to connect nodes with ecdsa context failed. reason:
Failed to connect to all the nodes!
ssl handshake failed:/172.16.171.137:20200
reason: General OpenSslEngine problem. Please make sure the certificate are correctly configured and copied.

刚开始以为是jar包冲突导致的,换了几个关键包的版本,都没起作用

运行环境如下图
在这里插入图片描述

经过尝试,最终得到2个解决方法

1.用高版本jdk,我一直用的jdk8,换成jdk11后,启动成功,问题解决;

2.修改jdk8的java.security文件,注释掉jdk.disabled.namedCurves,文件目录为jdk1.8.0/jre/lib/security,启动成功,问题解决;

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/xingxincsdn/article/details/125768039
今日推荐