diff options
author | Luca Deri <deri@ntop.org> | 2018-05-14 21:40:27 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2018-05-14 21:40:27 +0200 |
commit | 1076455c01bfcfa51b24ff8d681e65fd00047dbd (patch) | |
tree | 1ffe59c0ae57a55499cece7a2131431bdcf6eea2 /src/lib/protocols/ssl.c | |
parent | 2d486aeed8e6450cc8034d6244848297bdefc31e (diff) |
Added ndpi_set_detection_preferences() APi call
Diffstat (limited to 'src/lib/protocols/ssl.c')
-rw-r--r-- | src/lib/protocols/ssl.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/lib/protocols/ssl.c b/src/lib/protocols/ssl.c index adb0e9cf4..aa649f579 100644 --- a/src/lib/protocols/ssl.c +++ b/src/lib/protocols/ssl.c @@ -225,9 +225,11 @@ int getSSLcertificate(struct ndpi_detection_module_struct *ndpi_struct, } if(num_dots >= 2) { - stripCertificateTrailer(buffer, buffer_len); - snprintf(flow->protos.ssl.server_certificate, - sizeof(flow->protos.ssl.server_certificate), "%s", buffer); + if(!ndpi_struct->disable_metadata_export) { + stripCertificateTrailer(buffer, buffer_len); + snprintf(flow->protos.ssl.server_certificate, + sizeof(flow->protos.ssl.server_certificate), "%s", buffer); + } return(1 /* Server Certificate */); } } @@ -289,9 +291,11 @@ int getSSLcertificate(struct ndpi_detection_module_struct *ndpi_struct, buffer[len] = '\0'; stripCertificateTrailer(buffer, buffer_len); - snprintf(flow->protos.ssl.client_certificate, - sizeof(flow->protos.ssl.client_certificate), "%s", buffer); - + if(!ndpi_struct->disable_metadata_export) { + snprintf(flow->protos.ssl.client_certificate, + sizeof(flow->protos.ssl.client_certificate), "%s", buffer); + } + /* We're happy now */ return(2 /* Client Certificate */); } |