SHA256
1
0
forked from pool/pidgin
pidgin/pidgin-enable-sni-gnutls.patch
Alexei Sorokin 0ee449f7a5 Accepting request 595913 from home:zhangxiaofei:branches:network:pidgin
- Add pidgin-enable-sni-gnutls.patch: Enable SNI for gnutls to
  avoid SSL handshake failure, patch written by Tiago Herrmann
  (therrmann@suse.com) (boo#1086349 pidgin.im#17300).

OBS-URL: https://build.opensuse.org/request/show/595913
OBS-URL: https://build.opensuse.org/package/show/network:pidgin/pidgin?expand=0&rev=25
2018-04-12 10:01:12 +00:00

16 lines
581 B
Diff

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