diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2021-11-02 22:08:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-02 22:08:15 +0100 |
commit | 55880e4ae4cb651f54a9531ba9732977d9dd517f (patch) | |
tree | 4a8e0e4226dd3c237baa68b4749c75ac2b4d0967 /src | |
parent | 1f6c94e6630e54c1dc3c8d2e7d6af16712f10cbd (diff) |
TLS: fix two warnings (#1365)
Disable unit tests on CI for big-endian target. We know we have multiple
issues on big-endian architectures (see #1312) and so the unit tests
always fail there. Ignore this error for the time being and let the CI
pass if we don't have other issues.
Remove an unused automa definition
Diffstat (limited to 'src')
-rw-r--r-- | src/include/ndpi_typedefs.h | 1 | ||||
-rw-r--r-- | src/lib/protocols/tls.c | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h index 177a7610c..e4dc2438f 100644 --- a/src/include/ndpi_typedefs.h +++ b/src/include/ndpi_typedefs.h @@ -1087,7 +1087,6 @@ struct ndpi_detection_module_struct { /* HTTP/DNS/HTTPS/QUIC host matching */ ndpi_automa host_automa, /* Used for DNS/HTTPS */ content_automa, /* Used for HTTP subprotocol_detection */ - subprotocol_automa, /* Used for HTTP subprotocol_detection */ risky_domain_automa, tls_cert_subject_automa, malicious_ja3_automa, malicious_sha1_automa, host_risk_mask_automa, common_alpns_automa; diff --git a/src/lib/protocols/tls.c b/src/lib/protocols/tls.c index 301ea1937..5b2941405 100644 --- a/src/lib/protocols/tls.c +++ b/src/lib/protocols/tls.c @@ -1783,7 +1783,7 @@ int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct, #endif if((s_offset+extension_len-2) <= total_len) { - for(i=0; i<extension_len-2 && s_offset + i + 1 < total_len; i += 2) { + for(i=0; i<(u_int32_t)extension_len-2 && s_offset + i + 1 < total_len; i += 2) { u_int16_t s_group = ntohs(*((u_int16_t*)&packet->payload[s_offset+i])); #ifdef DEBUG_TLS @@ -1814,7 +1814,7 @@ int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct, printf("Client TLS [EllipticCurveFormat: len=%u]\n", extension_len); #endif if((s_offset+extension_len-1) <= total_len) { - for(i=0; i<extension_len-1 && s_offset+i < total_len; i++) { + for(i=0; i<(u_int32_t)extension_len-1 && s_offset+i < total_len; i++) { u_int8_t s_group = packet->payload[s_offset+i]; #ifdef DEBUG_TLS |