Renamed TLS requested server name
This commit is contained in:
@@ -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;
|
||||
|
||||
+4
-4
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user