Add support for SNI connecting trough TLS

This will pass hostname.
This fixes #137.

You can easily verify the change with a network capture program running
something like

    remote-viewer spice+tls://

you will see the hostname in the initial exchange.

Signed-off-by: Frediano Ziglio <>
Acked-by: Victor Toso <>
2 jobs for master in 3 minutes and 35 seconds (queued for 4 seconds)
Status Name Job ID Coverage
passed fedora #13011253


passed windows #13011254