diff options
Diffstat (limited to 'src/core/wee-network.c')
-rw-r--r-- | src/core/wee-network.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/core/wee-network.c b/src/core/wee-network.c index 7eb94ca49..d68bbefcd 100644 --- a/src/core/wee-network.c +++ b/src/core/wee-network.c @@ -1,7 +1,7 @@ /* * wee-network.c - network functions * - * Copyright (C) 2003-2015 Sébastien Helleu <flashcode@flashtux.org> + * Copyright (C) 2003-2016 Sébastien Helleu <flashcode@flashtux.org> * Copyright (C) 2005-2010 Emmanuel Bouthenot <kolter@openics.org> * Copyright (C) 2010 Gu1ll4um3r0m41n <aeroxteam@gmail.com> * Copyright (C) 2012 Simon Arlott @@ -1634,6 +1634,19 @@ network_connect_with_fork (struct t_hook *hook_connect) unhook (hook_connect); return; } + rc = gnutls_server_name_set (*HOOK_CONNECT(hook_connect, gnutls_sess), + GNUTLS_NAME_DNS, + HOOK_CONNECT(hook_connect, address), + strlen (HOOK_CONNECT(hook_connect, address))); + if (rc != GNUTLS_E_SUCCESS) + { + (void) (HOOK_CONNECT(hook_connect, callback)) + (hook_connect->callback_data, + WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR, + 0, -1, _("set server name indication (SNI) failed"), NULL); + unhook (hook_connect); + return; + } rc = gnutls_priority_set_direct (*HOOK_CONNECT(hook_connect, gnutls_sess), HOOK_CONNECT(hook_connect, gnutls_priorities), &pos_error); |