Restored 32 bit value in ndpi_match_string_value()

This commit is contained in:
Luca Deri
2021-06-21 17:06:22 +02:00
parent 613e21002a
commit 0cbb4b2ffa
3 changed files with 54 additions and 17 deletions
+3 -2
View File
@@ -591,12 +591,13 @@ static void processCertificateElements(struct ndpi_detection_module_struct *ndpi
if(flow->detected_protocol_stack[1] == NDPI_PROTOCOL_UNKNOWN) {
/* No idea what is happening behind the scenes: let's check the certificate */
u_int16_t proto_id;
u_int32_t val;
int rc = ndpi_match_string_value(ndpi_struct->tls_cert_subject_automa.ac_automa,
rdnSeqBuf, strlen(rdnSeqBuf), &proto_id);
rdnSeqBuf, strlen(rdnSeqBuf), &val);
if(rc == 0) {
/* Match found */
u_int16_t proto_id = (u_int16_t)val;
ndpi_protocol ret = { NDPI_PROTOCOL_TLS, proto_id, NDPI_PROTOCOL_CATEGORY_UNSPECIFIED};
flow->detected_protocol_stack[0] = proto_id,