尝试使用SSL证书运行Spring Boot应用程序时遇到了此异常。该应用程序作为Docker容器在Kubernetes内部运行。

关键问题是,该专有名词的描述为空。

有人遇到过这样的问题吗?

UPDATE1-我的Dockerfile基于openjdk:8-jre-alpine。我已还原
回到openjdk:8u111-jre-alpine,错误消失。我仍然不知道错误的原因。

java.lang.RuntimeException: java.security.InvalidAlgorithmParameterException
        at sun.security.ssl.Handshaker.checkThrown(Handshaker.java:1476) ~[na:1.8.0_121]
        at sun.security.ssl.SSLEngineImpl.checkTaskThrown(SSLEngineImpl.java:535) ~[na:1.8.0_121]
        at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:813) ~[na:1.8.0_121]
        at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:781) ~[na:1.8.0_121]
        at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624) ~[na:1.8.0_121]
        at org.apache.tomcat.util.net.SecureNioChannel.handshakeUnwrap(SecureNioChannel.java:459) ~[tomcat-embed-core-8.5.6.jar!/:8.5.6]
        at org.apache.tomcat.util.net.SecureNioChannel.handshake(SecureNioChannel.java:232) ~[tomcat-embed-core-8.5.6.jar!/:8.5.6]
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1387) ~[tomcat-embed-core-8.5.6.jar!/:8.5.6]
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.6.jar!/:8.5.6]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_121]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_121]
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.6.jar!/:8.5.6]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]
Caused by: java.security.ProviderException: java.security.InvalidAlgorithmParameterException
        at sun.security.ec.ECKeyPairGenerator.generateKeyPair(ECKeyPairGenerator.java:147) ~[sunec.jar:1.8.0_121]
        at java.security.KeyPairGenerator$Delegate.generateKeyPair(KeyPairGenerator.java:703) ~[na:1.8.0_121]
        at sun.security.ssl.ECDHCrypt.<init>(ECDHCrypt.java:65) ~[na:1.8.0_121]
        at sun.security.ssl.ServerHandshaker.setupEphemeralECDHKeys(ServerHandshaker.java:1431) ~[na:1.8.0_121]
        at sun.security.ssl.ServerHandshaker.trySetCipherSuite(ServerHandshaker.java:1229) ~[na:1.8.0_121]
        at sun.security.ssl.ServerHandshaker.chooseCipherSuite(ServerHandshaker.java:1026) ~[na:1.8.0_121]
        at sun.security.ssl.ServerHandshaker.clientHello(ServerHandshaker.java:741) ~[na:1.8.0_121]
        at sun.security.ssl.ServerHandshaker.processMessage(ServerHandshaker.java:224) ~[na:1.8.0_121]
        at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1026) ~[na:1.8.0_121]
        at sun.security.ssl.Handshaker$1.run(Handshaker.java:966) ~[na:1.8.0_121]
        at sun.security.ssl.Handshaker$1.run(Handshaker.java:963) ~[na:1.8.0_121]
        at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_121]
        at sun.security.ssl.Handshaker$DelegatedTask.run(Handshaker.java:1416) ~[na:1.8.0_121]
        at org.apache.tomcat.util.net.SecureNioChannel.tasks(SecureNioChannel.java:407) ~[tomcat-embed-core-8.5.6.jar!/:8.5.6]
        at org.apache.tomcat.util.net.SecureNioChannel.handshakeUnwrap(SecureNioChannel.java:467) ~[tomcat-embed-core-8.5.6.jar!/:8.5.6]
        ... 7 common frames omitted
Caused by: java.security.InvalidAlgorithmParameterException: null
        at sun.security.ec.ECKeyPairGenerator.generateECKeyPair(Native Method) ~[sunec.jar:1.8.0_121]
        at sun.security.ec.ECKeyPairGenerator.generateKeyPair(ECKeyPairGenerator.java:128) ~[sunec.jar:1.8.0_121]
        ... 21 common frames omitted

最佳答案

我在docker-openjdk的github上为此打开了一个问题,这似乎与受支持的椭圆曲线有关
openjdk / jdk / src / share / classes / sun / security / ssl / SupportedEllipticCurvesExtension.java

https://github.com/docker-library/openjdk/issues/115

该修复程序已合并到openjdk-alpine的8.131.11-r2中

关于java - java.security.InvalidAlgorithmParameterException:空,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/43067340/

10-12 07:06