Sni support

This patch adds support for checking if a server use SNI.