gpt4 book ai didi

ssl - java.security.spec.InvalidKeySpecException : does not support java. security.spec.ECPublicKeySpec 的原因是什么?

转载 作者:太空宇宙 更新时间:2023-11-03 14:56:05 28 4
gpt4 key购买 nike

我正在尝试通过 https 向服务器验证我的客户端应用程序 - 我正在使用 axis 1.4 jar。我将正确的 JKS 文件传递​​给信任库。但是,我收到以下异常。

   Caused by: javax.net.ssl.SSLException: Server key
at com.sun.net.ssl.internal.ssl.Handshaker.throwSSLException(Handshaker.java:927)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:199)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:593)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:529)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:958)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1203)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1230)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1214)
at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:186)
at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
... 26 more
Caused by: java.security.spec.InvalidKeySpecException: does not support java.security.spec.ECPublicKeySpec
at com.certicom.ecc.jcae.ECKeyFactorySpi.engineGeneratePublic(Unknown Source)
at java.security.KeyFactory.generatePublic(KeyFactory.java:304)
at com.sun.net.ssl.internal.ssl.HandshakeMessage$ECDH_ServerKeyExchange.<init>(HandshakeMessage.java:910)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:195)
... 36 more

最佳答案

已确定 ECDH 密码套件默认情况下不是 java 1.6 设置的一部分,这导致了不支持 ECDH 规范的异常。

这是通过在 java 设置的 bcprov-jdk1.6.jar (bouncycaSTLe) 中添加这个规范来解决的。为此,请进行以下更改

java/jdk1.6.0_45\jre\lib\security\java.security

security.provider.1=org.bouncycaSTLe.jce.provider.BouncyCaSTLeProvider

[注:security.provider.1 - 编号表示选择密码套件的优先级]

并在jdk1.6.0_45\jre\lib\ext中添加bcprov-jdk1.6.jar

关于ssl - java.security.spec.InvalidKeySpecException : does not support java. security.spec.ECPublicKeySpec 的原因是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29164476/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com