| Commit message (Collapse) | Author | Age |
| |
|
| |
|
|\
| |
| | |
Added support for mingw xcompile.
|
| |
| |
| |
| | |
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
|
|/ |
|
|
|
|
| |
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To support QUIC payload and header decryption, it is necessary to choose an
external crypto library to handle the low-level crypto stuff. Since we will
use some Wireshark code, it is quite natural to choose the same library used
by Wireshark itself: libgcrypt.
More precisely, we will use libgcrypt and libgpg-error.
Both libraries have LGPL license, so there should be no issue from this point
of view.
These libraries are not required to build nDPI, and their usage is optional:
nDPI will keep working (and compiling) even if they are not available.
However, without them, QUIC sub-classification is next to impossible.
The configure flag "--disable-gcrypt" forces the build system to ignore these
libraries.
libgpg-error is only used for debug to have meaningful error messages and its
usage is trivial.
The same cannot be said for libgcrypt because its initialization is a significant
issue.
The rest of this commit message try explaining how libgcrypt is
initialized.
According to the documentation
https://gnupg.org/documentation/manuals/gcrypt/Initializing-the-library.html
https://gnupg.org/documentation/manuals/gcrypt/Multi_002dThreading.html#Multi_002dThreading
libgcrypt must be initialized before using it, but such initialization should
be performed by the actual application and not by any library.
Forcing the users to proper initialize libgcrypt in their own code seems
unreasonable: most people using nDPI might be complete unaware of any crypto
stuff and update each and every one application linking to nDPI with specific
libgcrypt code should be out of question, anyway.
Fortunately, it seems a workaround exists to initialize libgcrypt in a library
https://lists.gnupg.org/pipermail/gcrypt-devel/2003-August/000458.html
Therefore, we could provide a wrapper to this initialization stuff in a nDPI
function. Unfortunately nDPI API lacks a global init function that must be
called only once, before any other functions. We could add it, but that would
be a major API break.
AFAIK, ndpi_init_detection_module() might be called multiple times, for example
to create multiple independent dpi engines in the same program.
The proposed solution is to (optionally) initialize libgcrypt in
ndpi_init_detection_module() anyway:
* if the actual application doesn't directly use libgcrypt and only calls
ndpi_init_detection_module() once, everything is formally correct and it
should work out of the box [by far the most common user case];
* if the actual application already uses libgcrypt directly, it already
performs the required initialization. In this case the ndpi_prefs.ndpi_dont_init_libgcrypt
flag should be passed to ndpi_init_detection_module() to avoid further
initializations.
The only scenario not supported by this solution is when the application is
unaware of libgcrypt and calls ndpi_init_detection_module() multiple times
concurrently. But this scenario should be uncommon.
A completely different option should be to switch to another crypto library,
with a huge impact on the QUIC dissector code.
Bottom line: crypto is hard, using libgcrypt is complex and the proposed
initialization, even if not perfect, should cover the most frequent user
cases and should work, for the time being.
If anyone has some suggestions...
|
| |
|
| |
|
| |
|
|
|
|
| |
Fix a memory leak and an issue (re)-introduced in configure script
|
|
|
|
| |
Should fix ossfuzz build
|
|
|
|
| |
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
* Added compiler search list for AC_PROG_CC, AM_PROG_CC_C_O, AC_PROG_CXX, AC_PROG_CC_STDC
for Mac OS X only
The list rendered the AX_CHECK_COMPILE_FLAG([-fsanitize=fuzzer]) useless as it did use
clang for AX_CHECK_COMPILE_FLAG but gcc during the compile process. Seems broken somehow.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
|
|
|
|
|
|
|
| |
./tests/do.sh can supports SMP/MT via environment variables.
Removed -fno-sanitize=shift as well, was fixed by 317d3ffd.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
|
| |
|
| |
|
|
|
|
| |
Fixes warning
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* renamed --with-llvm-sanitizer to --with-sanitizer
* disable all optimisations (-O0) if --with-sanitizer set,
no functions/paramaters/variables will be optimised, improves debugging
* enable undefined behaviour sanitizer (ubsan)
* enable leak sanitizer (lsan)
* check if -fsanitize=fuzzer is available and --enable-fuzztargets set,
fail if not (only supported by clang)
* include level 3 debugging information (-g3), improves macro debugging
* disabled ubsan misaligned pointer access and lshift overflow
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
|
|
|
|
|
|
| |
(protocol or category)
Removed hyperscan support that is apperently unused
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
To enable the leaks detector, set the ASAN_OPTIONS=detect_leaks=1
environment variable, e.g:
ASAN_OPTIONS=detect_leaks=1 example/ndpiReader -i test.pcap
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
And configur option enable-fuzztargets
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
ndpi fails to cross build from source, because configure.seed hard codes
the build architecture pkg-config. It is best to use PKG_CHECK_MODULES
instead. Please consider applying the attached patch.
See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=939286
|
| |
|
| |
|
| |
|
|\
| |
| | |
Respect CXX variable during configure
|
| |
| |
| |
| |
| |
| |
| |
| | |
commit 6ac83ce7eb99 use CXX to link ndpiReader however CXX is not
properly set in configure step
Fixes: 6ac83ce7eb99 ("Fixes broken hyperscan compilation")
Signed-off-by: chiehminw <chiehminw@synology.com>
|
|/
|
|
|
|
|
|
| |
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good.
This date call works with GNU date and BSD date.
Also use UTC/gmtime to be independent of timezone.
|
|
|
|
| |
Added time measurement in ndpiReader (processing and setup time)
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Add back pkgconfig file. It is required by ntopng to find the install…
|
| |
| |
| |
| | |
shared library.
|