diff options
author | Luca Deri <deri@ntop.org> | 2021-10-28 10:16:07 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2021-10-28 10:16:33 +0200 |
commit | a9aa46287d8beb2ac7f76605f91c45a1018cf500 (patch) | |
tree | 5980d2bf450580ba31407a3b8b4a9ecf841b8b26 /src/lib/protocols/tls.c | |
parent | a25d9d871edc7198d10a7db1c5948cbec289c723 (diff) |
Little change in TLS debug traces
Diffstat (limited to 'src/lib/protocols/tls.c')
-rw-r--r-- | src/lib/protocols/tls.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/protocols/tls.c b/src/lib/protocols/tls.c index 16a5e2c0a..1a490607b 100644 --- a/src/lib/protocols/tls.c +++ b/src/lib/protocols/tls.c @@ -524,6 +524,12 @@ static void processCertificateElements(struct ndpi_detection_module_struct *ndpi } if(matched_name == 0) { +#if DEBUG_TLS + printf("[TLS] Trying to match '%s' with '%s'\n", + flow->protos.tls_quic_stun.tls_quic.client_requested_server_name, + dNSName); +#endif + if(flow->protos.tls_quic_stun.tls_quic.client_requested_server_name[0] == '\0') matched_name = 1; /* No SNI */ else if (dNSName[0] == '*') @@ -534,19 +540,15 @@ static void processCertificateElements(struct ndpi_detection_module_struct *ndpi { char * first_dot = strchr(flow->protos.tls_quic_stun.tls_quic.client_requested_server_name, '.'); -#if DEBUG_TLS - printf("[TLS] Trying to match '%s' with '%s'\n", - flow->protos.tls_quic_stun.tls_quic.client_requested_server_name, - dNSName); -#endif if (first_dot == NULL || first_dot >= label) { matched_name = 1; } } } - else if(strcmp(flow->protos.tls_quic_stun.tls_quic.client_requested_server_name, dNSName) == 0) + else if(strcmp(flow->protos.tls_quic_stun.tls_quic.client_requested_server_name, dNSName) == 0) { matched_name = 1; + } } if(flow->protos.tls_quic_stun.tls_quic.server_names == NULL) |