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