From 7b27ff386a33d57bf6e5ab9f35d0369d8a267c56 Mon Sep 17 00:00:00 2001 From: Kenny MacDermid Date: Fri, 3 Jan 2014 21:28:28 -0400 Subject: Send the server_name extension. Required by sniproxy when forwarding the connection. --- src/libwaitress/waitress.c | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- cgit v1.2.3