diff options
-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) |