core/probe.c: Fix TLS probe when handshake version != SSL version
GnuTLS sends a handshake with SSL 3.0 (0x0300) in the outer packet, but mentions TLS 1.2 (0x0303) in the Client Hello. There's no real need for uhub to validate these fields, as OpenSSL should do that itself already. Just use the version mentioned in Client Hello for logging output.
This commit is contained in:
parent
9651a99d46
commit
b9005b1724
|
@ -76,12 +76,11 @@ static void probe_net_event(struct net_connection* con, int events, void *arg)
|
|||
probe_recvbuf[0] == 22 &&
|
||||
probe_recvbuf[1] == 3 && /* protocol major version */
|
||||
probe_recvbuf[5] == 1 && /* message type */
|
||||
probe_recvbuf[9] == probe_recvbuf[1] &&
|
||||
probe_recvbuf[10] == probe_recvbuf[2])
|
||||
probe_recvbuf[9] == probe_recvbuf[1])
|
||||
{
|
||||
if (probe->hub->config->tls_enable)
|
||||
{
|
||||
LOG_TRACE("Probed TLS %d.%d connection", (int) probe_recvbuf[1], (int) probe_recvbuf[2]);
|
||||
LOG_TRACE("Probed TLS %d.%d connection", (int) probe_recvbuf[9], (int) probe_recvbuf[10]);
|
||||
if (user_create(probe->hub, probe->connection, &probe->addr))
|
||||
{
|
||||
probe->connection = 0;
|
||||
|
@ -90,7 +89,7 @@ static void probe_net_event(struct net_connection* con, int events, void *arg)
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_TRACE("Probed TLS %d.%d connection. TLS disabled in hub.", (int) probe_recvbuf[1], (int) probe_recvbuf[2]);
|
||||
LOG_TRACE("Probed TLS %d.%d connection. TLS disabled in hub.", (int) probe_recvbuf[9], (int) probe_recvbuf[10]);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue