SHA256
1
0
forked from pool/pidgin
pidgin/pidgin-enable-sni-gnutls.patch

14 lines
466 B
Diff
Raw Normal View History

--- 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);