mirror of
https://github.com/vel21ripn/nDPI.git
synced 2026-05-22 03:03:07 +00:00
TLS: better handling of encrypted/cleartext alert messages (#3095)
This commit is contained in:
parent
6755d3309a
commit
009a85ef53
1 changed files with 4 additions and 1 deletions
|
|
@ -1509,7 +1509,10 @@ int ndpi_search_tls_tcp(struct ndpi_detection_module_struct *ndpi_struct,
|
|||
printf("[TLS] *** TLS ALERT ***\n");
|
||||
#endif
|
||||
|
||||
if(len >= 7) {
|
||||
/* Basic heuristic to tell if the alert is encrypted or not */
|
||||
if(len == 7 &&
|
||||
(message->buffer[5] == 1 ||
|
||||
message->buffer[5] == 2)) {
|
||||
u_int8_t alert_level = message->buffer[5];
|
||||
|
||||
if(alert_level == 2 /* Warning (1), Fatal (2) */)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue