Fixed JA3C compuration wtih SSL (no TLS) traffic

This commit is contained in:
Luca Deri
2019-09-19 00:01:44 +02:00
parent cf0ca7db51
commit 16da3f58cc
4 changed files with 11 additions and 7 deletions
+5 -1
View File
@@ -31,7 +31,7 @@
extern char *strptime(const char *s, const char *format, struct tm *tm);
// #define DEBUG_TLS 1
/* #define DEBUG_TLS 1 */
#define DEBUG_FINGERPRINT 1
@@ -647,6 +647,7 @@ int getTLScertificate(struct ndpi_detection_module_struct *ndpi_struct,
} /* while */
if(!invalid_ja3) {
compute_ja3c:
ja3_str_len = snprintf(ja3_str, sizeof(ja3_str), "%u,", ja3.tls_handshake_version);
for(i=0; i<ja3.num_cipher; i++) {
@@ -696,6 +697,9 @@ int getTLScertificate(struct ndpi_detection_module_struct *ndpi_struct,
return(2 /* Client Certificate */);
}
} else if(offset == total_len) {
/* SSL does not have extensions etc */
goto compute_ja3c;
}
}
}