Older cmake versions have problems with the version number. When
installing OpenSSL on a 64 bit linux one also needs to create an
additional symlink to get cmake to use the correct library.
This commit fixes the compile-time warnings that OpenSSL 3.0 raises for
our source-code. For the cases where this was necessary we now have two
implementations - one for OpenSSL 1.1 and earlier, and one for OpenSSL
3.0.
This also makes our testsuite pass with OpenSSL 3.0
Relates to GH-1379
If we leave files sitting around, we trigger a Docker image double-build in CI,
because the build runs once, gets tested, and then gets run again when we push
the Docker image: the additional btest files cause Docker to detect a different
source tree, causing an image layer violation.
Also rename "cleanup" target to "clean", to align with rest of our tree.
This commit switches hashing from the more modern EVP message digest to
the older direct function calls, that are deprecated as of OpenSSL 3.0.
The reason is that we require the ability to store the internal state of
hash operations to disk. This is no longer possible with the
architecture that is used by the EVP digests; it is, however, possible
when using the legacy methods.
There might be a way to do this more cleanly in OpenSSL 3.1 - but for
the moment this seems like the easiest solution - even though I am not
really happy about it.
For details see zeek/zeek#1379 and openssl/openssl#14222
* origin/topic/timw/1620-unprocessed-packets:
Added plugin.unprocessed_packet_hook btest
Fix whitespace in help output
Add command-line option to write unprocessed packets to a file
GH-1620: Add event and plugin hook to track packets not processed
This commit also changes the PcapDumper to automatically flush after
every called to Dump(). This is because pcap_dump has an internal buffer
of some sort that only writes to the file after a set amount of bytes.
When using the new option on a low-traffic network, it might be a while
before you see any packets written since it has to overcome that buffer
limit first.
* topic/AbdelSaTd/case-insensitive-find:
testing-do-find-str_case-insensitive
case-insensitive-search-features-for-do_find_str
I did a few small style-fixes while merging this and expanded the test
a bit. I also removed unecessary commits.
Closes GH-1828
* origin/topic/robin/gh-1757-loadfile2:
Tweaking a couple of debug message.
Add new hook `HookLoadFileExtended` that allows plugins to supply Zeek script code to parse.
Move logic to execute `HookLoadFile` for signatures into rule matcher code.
This is a fixup commit for 72cbc7cd13
where we move some header files from `src/` to `src/3rdparty/` but
missed adding install rules for these header. Since some of these
headers are exposed in installed headers they need to be installed as
well.
* origin/topic/bbannier/issue-1780:
Add Github action exercising pre-commit
Add pre-commit config.
Format code with `clang-format`
Remove stale files `src/DebugCmdInfoConstants.*`
Disable formatting for files in `testing/btest/plugins`
Move 3rdparty source files to `3rdparty/`
This addresses review feedback of GH-1831 and additionally fixes one
case in which PayloadLen was used in a way that would have given
problematic results when TSO is enabled.
This patch adds a Github action which exercises pre-commit linters for
commits to the `master` branch or for pull requests. We adds this task
as a Github action since we expect it to finish quickly; running outside
of Cirrus makes it possible provide feedback quickly.
This patch adds `clang-format` as only linter for now. This replaces the
previously used script from `auxil/run-clang-format` which we remove.
This requires the Python program `pre-commit`
(https://pypi.org/project/pre-commit/). With that one can then run
`clang-format` on the whole codebase with
$ pre-commit run -a clang-format
or on just the staged files
# Explicitly selecting linter.
$ pre-commit run clang-format
# Run all linters (currently just `clang-format`).
$ pre-commit
`pre-commit` supports managing Git commit hooks so that linters are run
on commit. Linters can be installed with
$ pre-commit install
The documentation at https://pre-commit.com/ covers these topics in
addition to more information.
The files generated from `src/DebugCmdInfoConstants.in` are placed in
`build/src/` by the build setup, and generated file in `src/` removed
here were unused and possibly out-of-date.
Files in that folder were previously not formatted. With this patch we
now disable formatting in that folder explicitly by adding a dedicated
`clang-format` config which deactivates any formatting changes.