diff --git a/libpurple/plugins/ssl/ssl-gnutls.c b/libpurple/plugins/ssl/ssl-gnutls.c index 75e862d..d58d6e0 100644 --- a/libpurple/plugins/ssl/ssl-gnutls.c +++ b/libpurple/plugins/ssl/ssl-gnutls.c @@ -403,6 +403,10 @@ ssl_gnutls_connect(PurpleSslConnection *gsc) gnutls_transport_set_ptr(gnutls_data->session, GINT_TO_POINTER(gsc->fd)); + if (gsc->host) { + gnutls_server_name_set (gnutls_data->session, GNUTLS_NAME_DNS, gsc->host, strlen(gsc->host)); + } + gnutls_data->handshake_handler = purple_input_add(gsc->fd, PURPLE_INPUT_READ, ssl_gnutls_handshake_cb, gsc);