diff options
author | Luca Deri <deri@ntop.org> | 2019-07-02 00:05:17 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2019-07-02 00:05:17 +0200 |
commit | 8205f2c6f15a44230253d0fb1b655c1e31d59bfa (patch) | |
tree | 6702fa57b2d01744dcb144069349158548fdfc01 /example | |
parent | dd9db5d0b77ce4c5d0f5361b8811547c19ab9e4f (diff) |
Various TLS improvements
Diffstat (limited to 'example')
-rw-r--r-- | example/ndpiReader.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c index 6351ce034..dfc65072b 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -764,23 +764,6 @@ static char* print_cipher(ndpi_cipher_weakness c) { /* ********************************** */ -static char* ssl_version2str(u_int16_t version) { - static char v[8]; - - switch(version) { - case 0x300: return("SSLv3"); - case 0x301: return("TLSv1"); - case 0x302: return("TLSv1.1"); - case 0x303: return("TLSv1.2"); - case 0x304: return("TLSv1.3"); - } - - snprintf(v, sizeof(v), "%04X", version); - return(v); -} - -/* ********************************** */ - /** * @brief Print the flow */ @@ -835,7 +818,7 @@ static void printFlow(u_int16_t id, struct ndpi_flow_info *flow, u_int16_t threa if(flow->info[0] != '\0') fprintf(out, "[%s]", flow->info); - if(flow->ssh_ssl.ssl_version != 0) fprintf(out, "[%s]", ssl_version2str(flow->ssh_ssl.ssl_version)); + if(flow->ssh_ssl.ssl_version != 0) fprintf(out, "[%s]", ndpi_ssl_version2str(flow->ssh_ssl.ssl_version)); if(flow->ssh_ssl.ja3_client[0] != '\0') fprintf(out, "[JA3C: %s%s]", flow->ssh_ssl.ja3_client, print_cipher(flow->ssh_ssl.client_unsafe_cipher)); if(flow->ssh_ssl.server_info[0] != '\0') fprintf(out, "[server: %s]", flow->ssh_ssl.server_info); |