down votefavorite 
<https://stackoverflow.com/questions/48630448/netty-skips-hostname-validation-when-we-use-trust-manager-with-trustcertcollecti#>

I am using io netty version 4.1.19.Final

I am trying to set up a client which will connect to a server using TLS.

I want the netty to perform hostname validation when it receives TLS 
certificates, but it looks like since I am using a custom trustManager 
using TLS Trust file path netty skips hostname validation completely.

Is there a way for me to specify a custom trustManager using TLS Trust file 
path AND have io netty perform hostname validation????

SslContextBuilder builder = SslContextBuilder.forClient();File 
trustCertCollection = new File(conf.getTlsTrustCertsFilePath());
builder.trustManager(trustCertCollection);

Netty API:- 
https://netty.io/4.0/api/io/netty/handler/ssl/SslContextBuilder.html#trustManager-java.io.File-

Full code:- 
https://github.com/apache/incubator-pulsar/blob/master/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConnectionPool.java#L97



Have posted the same question on stack overflow:-

https://stackoverflow.com/questions/48630448/netty-skips-hostname-validation-when-we-use-trust-manager-with-trustcertcollecti

-- 
You received this message because you are subscribed to the Google Groups 
"Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/netty/714c2329-a02b-4ca0-beba-8bfc53124c1c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to