aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuca <deri@ntop.org>2020-01-02 07:37:03 +0100
committerLuca <deri@ntop.org>2020-01-02 07:37:03 +0100
commit8b01056b21905d4ad466aa74f7673ed06f66a64b (patch)
treeffe0b8599c94e2cf665bc879ad2f5ed9a633a1d9 /src
parentf6c7a33177d4db9c7fdac054b8b0e26f99715c28 (diff)
Renamed TLS requested server name
Diffstat (limited to 'src')
-rw-r--r--src/include/ndpi_typedefs.h2
-rw-r--r--src/lib/ndpi_main.c8
-rw-r--r--src/lib/ndpi_utils.c3
-rw-r--r--src/lib/protocols/tls.c5
4 files changed, 10 insertions, 8 deletions
diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h
index ba00185ea..bbfc76d18 100644
--- a/src/include/ndpi_typedefs.h
+++ b/src/include/ndpi_typedefs.h
@@ -1220,7 +1220,7 @@ struct ndpi_flow_struct {
struct {
struct {
u_int16_t ssl_version, server_names_len;
- char client_certificate[64], *server_names, server_organization[64];
+ char client_requested_server_name[64], *server_names, server_organization[64];
u_int32_t notBefore, notAfter;
char ja3_client[33], ja3_server[33];
u_int16_t server_cipher;
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index c5269171c..fc9eaf9ef 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -4219,7 +4219,7 @@ ndpi_protocol ndpi_detection_giveup(struct ndpi_detection_module_struct *ndpi_st
|| (flow->guessed_protocol_id == NDPI_PROTOCOL_WHATSAPP_CALL))
ndpi_set_detected_protocol(ndpi_str, flow, flow->guessed_protocol_id, NDPI_PROTOCOL_UNKNOWN);
else if((flow->l4.tcp.tls.hello_processed == 1)
- && (flow->protos.stun_ssl.ssl.client_certificate[0] != '\0')) {
+ && (flow->protos.stun_ssl.ssl.client_requested_server_name[0] != '\0')) {
ndpi_set_detected_protocol(ndpi_str, flow, NDPI_PROTOCOL_TLS, NDPI_PROTOCOL_UNKNOWN);
} else {
if((flow->guessed_protocol_id == NDPI_PROTOCOL_UNKNOWN)
@@ -4620,11 +4620,11 @@ void ndpi_fill_protocol_category(struct ndpi_detection_module_struct *ndpi_str,
}
}
- if(flow->protos.stun_ssl.ssl.client_certificate[0] != '\0') {
+ if(flow->protos.stun_ssl.ssl.client_requested_server_name[0] != '\0') {
unsigned long id;
int rc = ndpi_match_custom_category(ndpi_str,
- (char *)flow->protos.stun_ssl.ssl.client_certificate,
- strlen(flow->protos.stun_ssl.ssl.client_certificate),
+ (char *)flow->protos.stun_ssl.ssl.client_requested_server_name,
+ strlen(flow->protos.stun_ssl.ssl.client_requested_server_name),
&id);
if(rc == 0) {
diff --git a/src/lib/ndpi_utils.c b/src/lib/ndpi_utils.c
index 6979d099c..2e7fe4966 100644
--- a/src/lib/ndpi_utils.c
+++ b/src/lib/ndpi_utils.c
@@ -1043,7 +1043,8 @@ int ndpi_flow2json(struct ndpi_detection_module_struct *ndpi_struct,
if(!unknown_tls_version) {
ndpi_serialize_start_of_block(serializer, "tls");
ndpi_serialize_string_string(serializer, "version", version);
- ndpi_serialize_string_string(serializer, "client_cert", flow->protos.stun_ssl.ssl.client_certificate);
+ ndpi_serialize_string_string(serializer, "client_requested_server_name",
+ flow->protos.stun_ssl.ssl.client_requested_server_name);
if(flow->protos.stun_ssl.ssl.server_names)
ndpi_serialize_string_string(serializer, "server_names", flow->protos.stun_ssl.ssl.server_names);
ndpi_serialize_string_string(serializer, "issuer", flow->protos.stun_ssl.ssl.server_organization);
diff --git a/src/lib/protocols/tls.c b/src/lib/protocols/tls.c
index 1130eb7fe..a73cc2976 100644
--- a/src/lib/protocols/tls.c
+++ b/src/lib/protocols/tls.c
@@ -987,8 +987,9 @@ int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct,
cleanupServerName(buffer, sizeof(buffer));
- snprintf(flow->protos.stun_ssl.ssl.client_certificate,
- sizeof(flow->protos.stun_ssl.ssl.client_certificate), "%s", buffer);
+ snprintf(flow->protos.stun_ssl.ssl.client_requested_server_name,
+ sizeof(flow->protos.stun_ssl.ssl.client_requested_server_name),
+ "%s", buffer);
if(ndpi_match_hostname_protocol(ndpi_struct, flow, NDPI_PROTOCOL_TLS, buffer, strlen(buffer)))
flow->l4.tcp.tls.subprotocol_detected = 1;