A small question regarding Netty and io.netty.handler.ssl.SslContext
In Tomcat and org.apache.http.ssl.SSLContexts
, we have the possibility to perform the following:
HttpClient httpClient = HttpClients.custom() .setSSLContext(SSLContexts.custom() .loadKeyMaterial(someKeystorePropertlyInitialized) .loadTrustMaterial(someTruststorePropertlyInitialized) .build()) .setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE) .build();
(Appreciate if we can leave the fonts and not wrap inside a code block)
This can for instance fix issues such as Caused by: java.security.cert.CertificateException: No subject alternative DNS name matching xxx found
(This question is not about if NoopHostnameVerifier.INSTANCE
is the proper way to fix this.)
My question is, what is the equivalent in Netty of .setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE)
, without .trustManager(InsecureTrustManagerFactory.INSTANCE)
, because I have a real trust store, I just want to skip the host name, not everything
Maybe something with reactor.netty.http.client.HttpClient; HttpClient.create()
?