From: Philippe Antoine Date: Thu, 3 Nov 2022 12:42:57 +0000 (+0100) Subject: clean: use SC_MD5_HEX_LEN instead of magic number 32 X-Git-Tag: suricata-7.0.0-rc1~399 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c09ca7d171897a515e363465b81efdd7f80d08ed;p=thirdparty%2Fsuricata.git clean: use SC_MD5_HEX_LEN instead of magic number 32 --- diff --git a/src/detect-tls-ja3-hash.c b/src/detect-tls-ja3-hash.c index 5087a328df..aa9bd95856 100644 --- a/src/detect-tls-ja3-hash.c +++ b/src/detect-tls-ja3-hash.c @@ -179,7 +179,7 @@ static bool DetectTlsJa3HashValidateCallback(const Signature *s, SCLogWarning(SC_WARN_POOR_RULE, "rule %u: %s", s->id, *sigerror); } - if (cd->content_len == 32) + if (cd->content_len == SC_MD5_HEX_LEN) return true; *sigerror = "Invalid length of the specified JA3 hash (should " diff --git a/src/detect-tls-ja3s-hash.c b/src/detect-tls-ja3s-hash.c index aeceddc0b9..92c811b2ce 100644 --- a/src/detect-tls-ja3s-hash.c +++ b/src/detect-tls-ja3s-hash.c @@ -177,7 +177,7 @@ static bool DetectTlsJa3SHashValidateCallback(const Signature *s, SCLogWarning(SC_WARN_POOR_RULE, "rule %u: %s", s->id, *sigerror); } - if (cd->content_len == 32) + if (cd->content_len == SC_MD5_HEX_LEN) return true; *sigerror = "Invalid length of the specified JA3S hash (should "