netty/netty — pull request #3153 by sunng87 (2014-11-19 15:28:35+00:00)
Title: TLS Server Name Indication(SNI) support (reworked)

This patch added support for SNI detection. Now your Netty server could host multiple certificates and serve client with proper one.

Usage:

``` java

// application wide
SniHandler.Builder builder = new SniHandler.Builder();

builder.addContext("*.avoscloud.com", sslcontext1)
.addContext("*.leancloud.cn", sslcontext2)
.defaultContext(sslcontext1);

// in the ChannelInitializer

pipeline.addLast(builder.build());

```

This handler detects SNI extension, then adds proper SslHandler to the pipeline.

You may check #3020 for previous discussions.