Подскажите, пожалуйста, какая может быть причина ошибки
22:05:22.725[WARN ][][reactor-http-nio-4]r.n.h.c.HttpClientConnect : [18da44ae, L:/172.17.0.60:48982 ! R:zoe-lk.fincert.cbr.ru/212.40.223.94:443] The connection observed an error io.netty.handler.codec.DecoderException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:480)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:279)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:995)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:830)
Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at ru.CryptoPro.ssl.cl_64.B(Unknown Source)
at ru.CryptoPro.ssl.SSLEngineImpl.e(Unknown Source)
at ru.CryptoPro.ssl.SSLEngineImpl.a(Unknown Source)
at ru.CryptoPro.ssl.SSLEngineImpl.unwrap(Unknown Source)
at java.base/javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:634)
at io.netty.handler.ssl.SslHandler$SslEngineType$3.unwrap(SslHandler.java:295)
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1342)
at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1235)
at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1284)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:510)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:449)
... 17 more
Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at ru.CryptoPro.ssl.pc_9.cl_2.<init>(Unknown Source)
at ru.CryptoPro.ssl.pc_9.cl_4.a(Unknown Source)
at ru.CryptoPro.ssl.cl_120.a(Unknown Source)
at ru.CryptoPro.ssl.cl_120.a(Unknown Source)
at ru.CryptoPro.ssl.cl_120.a(Unknown Source)
at ru.CryptoPro.ssl.cl_120.checkServerTrusted(Unknown Source)
at ru.CryptoPro.ssl.cl_18.a(Unknown Source)
at ru.CryptoPro.ssl.cl_18.a(Unknown Source)
at ru.CryptoPro.ssl.cl_64.u(Unknown Source)
at ru.CryptoPro.ssl.cl_65.a(Unknown Source)
at ru.CryptoPro.ssl.cl_65.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:691)
at ru.CryptoPro.ssl.cl_66.run(Unknown Source)
at io.netty.handler.ssl.SslHandler.runDelegatedTasks(SslHandler.java:1548)
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1394)
... 21 more
Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at java.base/java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:200)
at java.base/java.security.cert.PKIXParameters.<init>(PKIXParameters.java:120)
at java.base/java.security.cert.PKIXBuilderParameters.<init>(PKIXBuilderParameters.java:104)
... 36 more
Используемый код
Цитата:System.setProperty("tls_prohibit_disabled_validation", "false")
System.setProperty("com.sun.security.enableCRLDP", "true")
System.setProperty("com.ibm.security.enableCRLDP", "true")
val trustStoreSettings = credentialsSettings.trustStore
val certStore = KeyStore.getInstance(trustStoreSettings.type())
certStore.load(FileInputStream(trustStoreSettings.path()), trustStoreSettings.password().toCharArray())
val trustManagerFactory = TrustManagerFactory.getInstance(TRUSTMANGER_ALG, PROVIDER)
trustManagerFactory.init(certStore)
val keyStore = KeyStore.getInstance(JCP.HD_STORE_NAME)
keyStore.load(null, null)
val keyManagerFactory = KeyManagerFactory.getInstance(KEYMANGER_ALG, PROVIDER)
keyManagerFactory.init(keyStore, credentialsSettings.privateKeyPassword.toCharArray())
return SslContextBuilder.forClient()
.keyManager(keyManagerFactory)
.trustManager(trustManagerFactory)
.protocols("TLSv1", "TLSv1.1", "TLSv1.2", "SSLv3")
.ciphers(listOf("TLS_CIPHER_2012", "TLS_CIPHER_2001"))
.sslContextProvider(Security.getProvider(PROVIDER))
.build()