diff options
author | Luca Deri <deri@ntop.org> | 2020-01-10 12:46:53 +0100 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2020-01-10 12:46:53 +0100 |
commit | a3e06da2a81ab761a2aaf331c8afe165b3557556 (patch) | |
tree | 6908883b5088b0a8df3d90fbbfa0dfe91816e4db /src/lib/protocols | |
parent | dc2107985186d5e616a53fbffbb4e003988710c4 (diff) |
Minor cleanup
Diffstat (limited to 'src/lib/protocols')
-rw-r--r-- | src/lib/protocols/tls.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/protocols/tls.c b/src/lib/protocols/tls.c index 8d3fc6ec9..d27a4ec00 100644 --- a/src/lib/protocols/tls.c +++ b/src/lib/protocols/tls.c @@ -304,9 +304,9 @@ static void processCertificateElements(struct ndpi_detection_module_struct *ndpi i += 3 /* skip the initial patten 55 1D 11 */; i++; /* skip the first type, 0x04 == BIT STRING, and jump to it's length */ - i += packet->payload[i] & 0x80 ? packet->payload[i] & 0x7F : 0; /* skip BIT STRING length */ + i += (packet->payload[i] & 0x80) ? (packet->payload[i] & 0x7F) : 0; /* skip BIT STRING length */ i += 2; /* skip the second type, 0x30 == SEQUENCE, and jump to it's length */ - i += packet->payload[i] & 0x80 ? packet->payload[i] & 0x7F : 0; /* skip SEQUENCE length */ + i += (packet->payload[i] & 0x80) ? (packet->payload[i] & 0x7F) : 0; /* skip SEQUENCE length */ i++; while(i < packet->payload_packet_len) { @@ -497,7 +497,6 @@ static int processTLSBlock(struct ndpi_detection_module_struct *ndpi_struct, static int ndpi_search_tls_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) { struct ndpi_packet_struct *packet = &flow->packet; - int rc = 1; u_int8_t something_went_wrong = 0; #ifdef DEBUG_TLS_MEMORY @@ -597,7 +596,7 @@ static int ndpi_search_tls_tcp(struct ndpi_detection_module_struct *ndpi_struct, flow->check_extra_packets = 0, flow->extra_packets_func = NULL; return(0); /* That's all */ } else - return(rc); + return(1); } /* **************************************** */ |