diff --git a/handler/src/main/java/io/netty/handler/ssl/AbstractSniHandler.java b/handler/src/main/java/io/netty/handler/ssl/AbstractSniHandler.java
index fa7e9059b9..dcba5852c0 100644
--- a/handler/src/main/java/io/netty/handler/ssl/AbstractSniHandler.java
+++ b/handler/src/main/java/io/netty/handler/ssl/AbstractSniHandler.java
@@ -16,20 +16,10 @@
package io.netty.handler.ssl;
import io.netty.buffer.ByteBuf;
-import io.netty.buffer.ByteBufUtil;
import io.netty.channel.ChannelHandlerContext;
-import io.netty.channel.ChannelOutboundHandler;
-import io.netty.channel.ChannelPromise;
-import io.netty.handler.codec.ByteToMessageDecoder;
-import io.netty.handler.codec.DecoderException;
import io.netty.util.CharsetUtil;
import io.netty.util.concurrent.Future;
-import io.netty.util.concurrent.FutureListener;
-import io.netty.util.internal.logging.InternalLogger;
-import io.netty.util.internal.logging.InternalLoggerFactory;
-import java.net.SocketAddress;
-import java.util.List;
import java.util.Locale;
/**
@@ -39,143 +29,9 @@ import java.util.Locale;
* The client will send host name in the handshake data so server could decide
* which certificate to choose for the host name.
*/
-public abstract class AbstractSniHandler extends ByteToMessageDecoder implements ChannelOutboundHandler {
+public abstract class AbstractSniHandler extends SslClientHelloHandler {
- private static final InternalLogger logger =
- InternalLoggerFactory.getInstance(AbstractSniHandler.class);
-
- private boolean handshakeFailed;
- private boolean suppressRead;
- private boolean readPending;
- private ByteBuf handshakeBuffer;
-
- @Override
- protected void decode(ChannelHandlerContext ctx, ByteBuf in, List