Fixed ndpi_ssl_version2str()

This commit is contained in:
Luca Deri
2019-10-08 23:57:56 +02:00
parent 24a26a2e94
commit 203359ed7f
+6 -5
View File
@@ -711,7 +711,7 @@ int ndpi_has_human_readeable_string(struct ndpi_detection_module_struct *ndpi_st
/* ********************************** */
char* ndpi_ssl_version2str(u_int16_t version) {
static char v[8];
static char v[12];
switch(version) {
case 0x0300: return("SSLv3");
@@ -719,15 +719,16 @@ char* ndpi_ssl_version2str(u_int16_t version) {
case 0x0302: return("TLSv1.1");
case 0x0303: return("TLSv1.2");
case 0x0304: return("TLSv1.3");
case 0xfb1a: return("TLSv1.3 (Fizz)"); /* https://engineering.fb.com/security/fizz/ */
case 0xfeff: return("DTLSv1.0");
case 0xfefd: return("DTLSv1.2");
case 0XFB1A: return("TLSv1.3 (Fizz)"); /* https://engineering.fb.com/security/fizz/ */
case 0XFEFF: return("DTLSv1.0");
case 0XFEFD: return("DTLSv1.2");
}
if((version >= 0x7f00) && (version <= 0x7fff))
return("TLSv1.3 (draft)");
snprintf(v, sizeof(v), "%04X", version);
snprintf(v, sizeof(v), "TLS (%04X)", version);
return(v);
}