Hi Lee,
am I understanding correctly, you're trying to use SNI support with
Grizzly HttpServer?
I am Lee. These days, I am just trying to study the SNI of Grizzly, even
after read your source code of the SNITest.java, I still do not know how
to let it works. Because, i do not understand:
>
> 1.How to bind to my Grizzly HTTP server supporting the HTTPS(SSL/TLS)
> to proved web services? Just using the TCPNIOTransport to bind a
> different port or need to bind to as same port as the Http server?
>
I can provide a sample by the end of the week.
The idea is to use HttpServer AddOn mechanism and update the HttpServer
FilterChain to use SNIFilter instead of SSLBaseFilter.
> 2.Could you explain the meaning of the code with blue color as //below
>
It just associates the hostname property with the connection.
> Do I need this line in my own code?
>
no. You may want to read this value, but definitely not set it.
> Can I switch to different SSL server configure for their host for
> supporting SNI in there?
>
Sure.
> If it return null, what will be happened for that host?
>
The SNIFilter's default server SSLEngineConfigurator will be used.
Thanks
WBR,
Alexey.
> //////////////////////////
>
> ilter.setServerSSLConfigResolver(new SNIServerConfigResolver() {
>
> @Override
>
> public SNIConfig resolve(Connection connection, String
> hostname) {
>
> */sniHostAttr.set(connection, hostname);/*
>
> return SNIConfig.newServerConfig(sslServerEngineConfig);
>
> }
>
> });
>
> Thanks! and looking forward for your reply!
>
> Best Regards,
>
> Lee
>