Added ndpi_set_detection_preferences() APi call
This commit is contained in:
+10
-6
@@ -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 */);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user