summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKenny MacDermid <kenny.macdermid@gmail.com>2014-01-03 21:28:28 -0400
committerLars-Dominik Braun <lars@6xq.net>2014-04-04 12:57:21 +0200
commit7b27ff386a33d57bf6e5ab9f35d0369d8a267c56 (patch)
treefb7f75d5e543106995603bb6b197899802fac8b4 /src
parent579e39ed8381aa0f36c44640b48301fee17f40dd (diff)
downloadpianobar-7b27ff386a33d57bf6e5ab9f35d0369d8a267c56.tar.gz
pianobar-7b27ff386a33d57bf6e5ab9f35d0369d8a267c56.tar.bz2
pianobar-7b27ff386a33d57bf6e5ab9f35d0369d8a267c56.zip
Send the server_name extension.
Required by sniproxy when forwarding the connection.
Diffstat (limited to 'src')
-rw-r--r--src/libwaitress/waitress.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libwaitress/waitress.c b/src/libwaitress/waitress.c
index 2910d68..9cf9b47 100644
--- a/src/libwaitress/waitress.c
+++ b/src/libwaitress/waitress.c
@@ -873,6 +873,10 @@ static WaitressReturn_t WaitressConnect (WaitressHandle_t *waith) {
}
}
+ /* Ignore return code as connection will likely still succeed */
+ gnutls_server_name_set (waith->request.tlsSession, GNUTLS_NAME_DNS,
+ waith->url.host, strlen (waith->url.host));
+
if (gnutls_handshake (waith->request.tlsSession) != GNUTLS_E_SUCCESS) {
return WAITRESS_RET_TLS_HANDSHAKE_ERR;
}