Skip to content
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

Detect validate callbacks 5634 v4 #11963

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

catenacyber
Copy link
Contributor

Link to ticket: https://redmine.openinfosecfoundation.org/issues/
https://redmine.openinfosecfoundation.org/issues/5634

Describe changes:

  • detect: change the ValidateCallback prototype to deduplicate code
  • detect: use one function for md5-like keywords (quic-cyu-hash, ssh-hassh, tls-ja3-hash...)

#11902 with review taken into account : ValidateCallback is not specialized, but extended to have the buffer id, so that keywords can share the same validator code when this buffer id is the only thing changing

This was done on the way to convert quic keywords to rust like #11575

With this PR, it should be easy to add a wrapper for rust for this ValidateCallback stuff

Ticket: 5634

Allows to share the same validator functions when only the buffer
id is changing like for urilen
Copy link

codecov bot commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.78%. Comparing base (378f678) to head (d9acacd).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11963      +/-   ##
==========================================
+ Coverage   82.76%   82.78%   +0.01%     
==========================================
  Files         910      910              
  Lines      249014   248910     -104     
==========================================
- Hits       206105   206055      -50     
+ Misses      42909    42855      -54     
Flag Coverage Δ
fuzzcorpus 60.76% <100.00%> (-0.02%) ⬇️
livemode 18.71% <18.60%> (+0.01%) ⬆️
pcap 44.16% <60.46%> (+0.30%) ⬆️
suricata-verify 62.20% <65.11%> (+0.03%) ⬆️
unittests 59.03% <58.13%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@inashivb inashivb self-requested a review October 16, 2024 05:50
@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 23117

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants