Little change in TLS debug traces

This commit is contained in:
Luca Deri
2021-10-28 10:16:33 +02:00
parent a25d9d871e
commit a9aa46287d
+8 -6
View File
@@ -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)