@@ -1240,8 +1240,10 @@ void ndpi_serialize_proto(struct ndpi_detection_module_struct *ndpi_struct,
12401240
12411241void ndpi_serialize_tls_blocks (struct ndpi_detection_module_struct * ndpi_struct ,
12421242 ndpi_serializer * serializer ,
1243- struct ndpi_flow_struct * flow ) {
1244- if ((ndpi_struct -> cfg .tls_max_num_blocks_to_analyze > 0 )
1243+ struct ndpi_flow_struct * flow ,
1244+ bool is_tls_proto ) {
1245+ if (is_tls_proto
1246+ && (ndpi_struct -> cfg .tls_max_num_blocks_to_analyze > 0 )
12451247 && (flow -> l4 .tcp .tls .tls_blocks != NULL )
12461248 && (flow -> l4 .tcp .tls .num_tls_blocks > 0 )) {
12471249 u_int16_t i , idx = 0 ;
@@ -1430,8 +1432,6 @@ static void ndpi_tls2json(struct ndpi_detection_module_struct *ndpi_struct, ndpi
14301432 u_int8_t unknown_tls_version ;
14311433 char version [16 ], unknown_cipher [8 ];
14321434
1433- __ndpi_unused_param (is_tls_proto );
1434-
14351435 ndpi_ssl_version2str (version , sizeof (version ), flow -> protos .tls_quic .ssl_version , & unknown_tls_version );
14361436
14371437 if (flow -> protos .tls_quic .notBefore )
@@ -1491,7 +1491,7 @@ static void ndpi_tls2json(struct ndpi_detection_module_struct *ndpi_struct, ndpi
14911491 ndpi_serialize_string_string (serializer , "fingerprint" , buf );
14921492 }
14931493
1494- ndpi_serialize_tls_blocks (ndpi_struct , serializer , flow );
1494+ ndpi_serialize_tls_blocks (ndpi_struct , serializer , flow , is_tls_proto );
14951495
14961496 ndpi_serialize_end_of_block (serializer );
14971497 }
0 commit comments