From 0de66286fa5f2e63a1da3df3c3ab9a1c1b29816a Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Mon, 15 Feb 2010 19:00:48 +0100 Subject: [PATCH] Partially fix bug #117 - tls_require ignored entirely in 0.3.0 released If tls_require is enabled then the hub will simply close the connection if a user connects without TLS. In the future we should redirect the user either to another server or to the adcs server. --- src/core/probe.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core/probe.c b/src/core/probe.c index 8a480de..591a358 100644 --- a/src/core/probe.c +++ b/src/core/probe.c @@ -46,6 +46,13 @@ static void probe_net_event(struct net_connection* con, int events, void *arg) if (memcmp(probe_recvbuf, "HSUP", 4) == 0) { LOG_TRACE("Probed ADC"); +#ifdef SSL_SUPPORT + if (probe->hub->config->tls_enable && probe->hub->config->tls_require) + { + LOG_TRACE("Not TLS connection - closing connection."); + } + else +#endif if (user_create(probe->hub, probe->connection, &probe->addr)) { probe->connection = 0;