]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
clean: use SC_MD5_HEX_LEN instead of magic number 32
authorPhilippe Antoine <pantoine@oisf.net>
Thu, 3 Nov 2022 12:42:57 +0000 (13:42 +0100)
committerVictor Julien <vjulien@oisf.net>
Tue, 8 Nov 2022 04:51:31 +0000 (06:51 +0200)
src/detect-tls-ja3-hash.c
src/detect-tls-ja3s-hash.c

index 5087a328dfcf0f73bbb4aa0a72d35037e4efc8b1..aa9bd95856c751cf1270ecdb63c48fbb8c15ad50 100644 (file)
@@ -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 "
index aeceddc0b951cfa459bae84bd5694fe8eed32324..92c811b2ceb1ad6b3c5a378325e9bf7e133ef2b0 100644 (file)
@@ -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 "