libpurple/plugins/ssl/ssl-gnutls.c

branch
release-2.x.y
changeset 40238
6dba8046e1b1
parent 39634
8324458e98f8
child 40322
3e026e7db681
equal deleted inserted replaced
40185:7a975763d3b6 40238:6dba8046e1b1
400 400
401 gnutls_credentials_set(gnutls_data->session, GNUTLS_CRD_CERTIFICATE, 401 gnutls_credentials_set(gnutls_data->session, GNUTLS_CRD_CERTIFICATE,
402 xcred); 402 xcred);
403 403
404 gnutls_transport_set_ptr(gnutls_data->session, GINT_TO_POINTER(gsc->fd)); 404 gnutls_transport_set_ptr(gnutls_data->session, GINT_TO_POINTER(gsc->fd));
405
406 /* SNI support. */
407 if (gsc->host && !g_hostname_is_ip_address(gsc->host))
408 gnutls_server_name_set(gnutls_data->session, GNUTLS_NAME_DNS, gsc->host, strlen(gsc->host));
405 409
406 gnutls_data->handshake_handler = purple_input_add(gsc->fd, 410 gnutls_data->handshake_handler = purple_input_add(gsc->fd,
407 PURPLE_INPUT_READ, ssl_gnutls_handshake_cb, gsc); 411 PURPLE_INPUT_READ, ssl_gnutls_handshake_cb, gsc);
408 412
409 /* Orborde asks: Why are we configuring a callback, then 413 /* Orborde asks: Why are we configuring a callback, then

mercurial