Is there a way to disable hostname verification for io.netty.handler.ssl.Sslcontext?
I have this code:
sslContext = SslContextBuilder
.forCli
I found that adding setAcceptAnyCertificate(true) to the clientConfig builder did the trick in this way:
sslContext = SslContextBuilder
.forClient()
.sslProvider(SslProvider.JDK)
.trustManager(InsecureTrustManagerFactory.INSTANCE)
.build();
DefaultAsyncHttpClientConfig.Builder builder = new DefaultAsyncHttpClientConfig.Builder();
builder.setSslContext(sslContext)
.setAcceptAnyCertificate(true);
AsyncHttpClientConfig asyncHttpClientConfig = builder.build();
Thanks everyone