java发送https请求出现Unknown named curve: 1.2.156.10197.1.301

异常

Caused by: java.io.IOException: Unknown named curve: 1.2.156.10197.1.301
   at sun.security.ec.ECParameters.engineInit(ECParameters.java:143)
   at java.security.AlgorithmParameters.init(AlgorithmParameters.java:293)
   at sun.security.x509.AlgorithmId.decodeParams(AlgorithmId.java:132)
   at sun.security.x509.AlgorithmId.<init>(AlgorithmId.java:114)
   at sun.security.x509.AlgorithmId.parse(AlgorithmId.java:372)
   at sun.security.x509.X509Key.parse(X509Key.java:168)
   at sun.security.x509.CertificateX509Key.<init>(CertificateX509Key.java:75)
   at sun.security.x509.X509CertInfo.parse(X509CertInfo.java:667)
   at sun.security.x509.X509CertInfo.<init>(X509CertInfo.java:167)

解决方法

    static {
       Security.removeProvider("SunEC");
   }

目前还不知道具体原因。

©️2020 CSDN 皮肤主题: 游动-白 设计师:上身试试 返回首页