-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JA4 for TLS and QUIC -- v10 #10725
JA4 for TLS and QUIC -- v10 #10725
Conversation
This gives app layer code a chance to access feature information.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #10725 +/- ##
==========================================
- Coverage 82.69% 82.63% -0.06%
==========================================
Files 926 929 +3
Lines 247637 248060 +423
==========================================
+ Hits 204790 204996 +206
- Misses 42847 43064 +217
Flags with carried forward coverage won't be shown. Click here to find out more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work Sascha :-)
- CI : 🟢
- Code : TODO
- Commits segmentation : nice
- Commit messages : ok for me
- Git ID set : looks fine for me
- CLA : you already contributed :-)
- Doc update : Ok, maybe there could be only one file/section ja-keywords
- Redmine ticket : ok
- Rustfmt : ok for ja4.rs
- Tests : 🟠 Left remarks there
- Dependencies added: none
#ifndef HAVE_JA3 | ||
static int DetectJA3SetupNoSupport(DetectEngineCtx *a, Signature *b, const char *c) | ||
{ | ||
SCLogError("no JA3 support built in"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonder if this could be only one function instead of copy pasting 4 lines...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH I would consider having a generic function in some common file less understandable than this way. By keeping such small static functions in the same file, they are closer to where they are used (in plain developer sight), which I consider much more straightforward than having to dig them up in the IDE. FWIW, if I could even use anonymous functions in C for that, I would ;)
I think code duplication is only bad if it is nontrivial code (with a big impact if it's changed) that is being copied, which is not the case here unless the signature if the Setup
function pointer would be to change -- but that would touch a lot of places anyway!
This is good enough for me even if there are still some nits/questions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This now needs a rebase, you can take this as an opportunity to get some more nits better
Will do! |
Done! |
Next PR: #10829 |
Previous PR: #10579
Link to redmine ticket: https://redmine.openinfosecfoundation.org/issues/6379
Changes to previous PR:
ifdef
s.SCJA4
wrapper struct.