aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorLuca <deri@ntop.org>2019-08-08 15:20:05 +0200
committerLuca <deri@ntop.org>2019-08-08 15:20:05 +0200
commitcce8a6026fab8d62e8e2cf484ed14531b1dc248b (patch)
treede8e9b2539386cf9525a79ff4be371ce9769afaf /example
parent419160f351c35c9ccf1f4d4c148b68f846a828a6 (diff)
Reworked SSL/TLS field naming
Diffstat (limited to 'example')
-rw-r--r--example/ndpiReader.c2
-rw-r--r--example/reader_util.c18
-rw-r--r--example/reader_util.h2
3 files changed, 11 insertions, 11 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c
index a18808a92..b5b787aa7 100644
--- a/example/ndpiReader.c
+++ b/example/ndpiReader.c
@@ -944,7 +944,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_tls.tls_version != 0) fprintf(out, "[%s]", ndpi_tls_version2str(flow->ssh_tls.tls_version));
+ if(flow->ssh_tls.ssl_version != 0) fprintf(out, "[%s]", ndpi_ssl_version2str(flow->ssh_tls.ssl_version));
if(flow->ssh_tls.client_info[0] != '\0') fprintf(out, "[client: %s]", flow->ssh_tls.client_info);
if(flow->ssh_tls.ja3_client[0] != '\0') fprintf(out, "[JA3C: %s%s]", flow->ssh_tls.ja3_client,
print_cipher(flow->ssh_tls.client_unsafe_cipher));
diff --git a/example/reader_util.c b/example/reader_util.c
index 454c8b5a6..8fdca1311 100644
--- a/example/reader_util.c
+++ b/example/reader_util.c
@@ -715,19 +715,19 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl
/* TLS */
else if((flow->detected_protocol.app_protocol == NDPI_PROTOCOL_TLS)
|| (flow->detected_protocol.master_protocol == NDPI_PROTOCOL_TLS)) {
- flow->ssh_tls.tls_version = flow->ndpi_flow->protos.stun_tls.tls.tls_version;
+ flow->ssh_tls.ssl_version = flow->ndpi_flow->protos.stun_ssl.ssl.ssl_version;
snprintf(flow->ssh_tls.client_info, sizeof(flow->ssh_tls.client_info), "%s",
- flow->ndpi_flow->protos.stun_tls.tls.client_certificate);
+ flow->ndpi_flow->protos.stun_ssl.ssl.client_certificate);
snprintf(flow->ssh_tls.server_info, sizeof(flow->ssh_tls.server_info), "%s",
- flow->ndpi_flow->protos.stun_tls.tls.server_certificate);
+ flow->ndpi_flow->protos.stun_ssl.ssl.server_certificate);
snprintf(flow->ssh_tls.server_organization, sizeof(flow->ssh_tls.server_organization), "%s",
- flow->ndpi_flow->protos.stun_tls.tls.server_organization);
+ flow->ndpi_flow->protos.stun_ssl.ssl.server_organization);
snprintf(flow->ssh_tls.ja3_client, sizeof(flow->ssh_tls.ja3_client), "%s",
- flow->ndpi_flow->protos.stun_tls.tls.ja3_client);
+ flow->ndpi_flow->protos.stun_ssl.ssl.ja3_client);
snprintf(flow->ssh_tls.ja3_server, sizeof(flow->ssh_tls.ja3_server), "%s",
- flow->ndpi_flow->protos.stun_tls.tls.ja3_server);
- flow->ssh_tls.server_unsafe_cipher = flow->ndpi_flow->protos.stun_tls.tls.server_unsafe_cipher;
- flow->ssh_tls.server_cipher = flow->ndpi_flow->protos.stun_tls.tls.server_cipher;
+ flow->ndpi_flow->protos.stun_ssl.ssl.ja3_server);
+ flow->ssh_tls.server_unsafe_cipher = flow->ndpi_flow->protos.stun_ssl.ssl.server_unsafe_cipher;
+ flow->ssh_tls.server_cipher = flow->ndpi_flow->protos.stun_ssl.ssl.server_cipher;
}
}
@@ -859,7 +859,7 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow,
if(enough_packets || (flow->detected_protocol.app_protocol != NDPI_PROTOCOL_UNKNOWN)) {
if((!enough_packets)
&& (flow->detected_protocol.master_protocol == NDPI_PROTOCOL_TLS)
- && (flow->ndpi_flow->protos.stun_tls.tls.ja3_server[0] == '\0'))
+ && (flow->ndpi_flow->protos.stun_ssl.ssl.ja3_server[0] == '\0'))
; /* Wait for JA3S certificate */
else {
/* New protocol detected or give up */
diff --git a/example/reader_util.h b/example/reader_util.h
index 71b68ed65..d100c0ad5 100644
--- a/example/reader_util.h
+++ b/example/reader_util.h
@@ -150,7 +150,7 @@ typedef struct ndpi_flow_info {
char dhcp_fingerprint[48];
struct {
- u_int16_t tls_version;
+ u_int16_t ssl_version;
char client_info[64], server_info[64], server_organization[64],
ja3_client[33], ja3_server[33];
u_int16_t server_cipher;