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.
This commit is contained in:
Jan Vidar Krey 2010-02-15 19:00:48 +01:00
parent 1a98bb6810
commit 0de66286fa

View File

@ -46,6 +46,13 @@ static void probe_net_event(struct net_connection* con, int events, void *arg)
if (memcmp(probe_recvbuf, "HSUP", 4) == 0) if (memcmp(probe_recvbuf, "HSUP", 4) == 0)
{ {
LOG_TRACE("Probed ADC"); 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)) if (user_create(probe->hub, probe->connection, &probe->addr))
{ {
probe->connection = 0; probe->connection = 0;