Commit Graph

256 Commits

Author SHA1 Message Date
sudden6
e04b890817
add scripts to run the fuzzing process
This adds scripts and Dockerfiles to run the fuzzing process standalone
or with OSS-Fuzz/ClusterFuzzLite integrations.
2022-01-10 21:05:51 +01:00
sudden6
7dd8dbd897
intercept network, crypto and time
This fuzzing harness must be as deterministic as possible for the fuzzer
to detect additional coverage reliably.
2022-01-10 21:05:49 +01:00
sudden6
9eb88798a3
add fuzzing harnesses
Toxsave harness ported to libFuzzer interface.
New harness for bootstrap phase.
2022-01-10 20:57:00 +01:00
Robin Linden
f78c741790
Update MSVC auto test disables to match what somewhat reliably works 2022-01-10 02:27:13 +01:00
Robin Linden
d2ef514569
Disable building cracker with MSVC
It uses OpenMP features MSVC doesn't support.
2022-01-10 02:27:13 +01:00
iphydf
4746a8b3af
cleanup: Remove apidsl; remove crypto_memcmp.
* `crypto_memcmp` was replaced by more specific functions. We never want
  to compare arbitrary amounts of data this way. We use these functions
  to compare key material.
* apidsl has been bothering people, so now we un-bother them. You're
  welcome.
* Added the memlock/unlock functions from the New Group Chats branch.
* Remove some system dependencies in crypto_core_mem.c.
* Renamed UPPERCASE_NAMES to Snake_Camel_Case names.
2021-12-19 19:22:38 +00:00
sudden6
828312c2f9
perf: improve speed of cracker.c
- more inteligent secret key generation
- use OpenMP for multithreading
- leave old cracker, because it's simple
- update old cracker to new coding style
2021-12-17 20:11:18 +01:00
iphydf
d9ab91970d
cleanup: Remove apidsl for everything except the public API.
Apidsl is not powerful enough to express all the things we need and
doesn't know how `#include` works. The generated headers are more complex
than they should be.
2021-12-15 17:36:29 +00:00
Robin Linden
4348b96a5b
Release 0.2.13 2021-12-06 23:28:52 +01:00
iphydf
57b0651ffd
test: Add some unit tests for important internal DHT functions.
We definitely need more of this kind of test so refactorings don't
accidentally break things in ways that happen to still work in auto
tests.
2021-12-01 14:08:37 +00:00
Robin Linden
56992b099e
Add support for the conan C/C++ package manager
* Don't overwrite the CMAKE_MODULE_PATH
* Allow linking libsodium statically with MSVC
* Allow finding libsodium the normal way on MSVC
* Allow using pthreads4w for pthreads on MSVC
* Fall back to find_package if pkg_find_module fails
* Don't pass incompatible compile flags to MSVC
* Also try to find Opus and libvpx using their canonical names
* Support building using conan
* Allow pkg_use_module to take a list of libraries to look for
* Build for Windows on Appveyor using conan
2020-05-29 15:36:26 +02:00
Robin Linden
9be4dbb433
Release 0.2.12 2020-05-01 12:58:27 +02:00
iphydf
de3c21b5b7
Disable non-hermetic tests by default.
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=955319.
2020-04-29 12:09:34 +00:00
iphydf
f3c6fc6771
Add execution trace option for debugging.
Use `cmake -DEXECUTION_TRACE=ON` to use it.
2020-04-27 23:10:27 +00:00
zoff99
cdafc6ff5e
Add new semi-private API functions to set per-packet-id custom handlers.
This is to prepare for ToxAV becoming independent of toxcore internal calls.
2020-04-16 12:28:13 +00:00
Robin Linden
7f9f8045cd
Fix things not being initialized if creating a TCP-only network 2020-04-13 22:43:51 +02:00
sudden6
6732e5ef2f
Add basic test adapter for AFL 2020-03-24 16:49:41 +01:00
Robin Linden
30b9369b01
Release 0.2.11 2020-03-22 21:12:04 +01:00
zugz (tox)
db07bda7f7
Add "member" invite response
This allows invitations to work in the case that the invitee is already
in the group, which can happen if the group becomes split. Such an
invitation is automatically accepted, leading to the peers becoming
connected in the group and sharing peer lists.
2020-03-18 00:00:00 +00:00
iphydf
28baf9632f
Remove testing/av_test.c.
It's a maintenance burden. Nobody uses this. It depends on an ancient
version of opencv that less and less systems actually have.
2020-03-02 21:07:55 +00:00
iphydf
0f7138c010
Upgrade bazel to 2.1.1.
Removed av_test, because it depends on an ancient opencv that starts to
really not exist on modern systems anymore.
2020-03-02 14:23:44 +00:00
Robin Lindén
7aab0d9952
Release 0.2.10 2019-05-30 15:36:12 +02:00
zugz (tox)
49e2406ffa
Expose api functions for enabling and disabling AV in AV groups
A group loaded from a savefile starts with AV disabled.
2019-02-10 00:00:00 +00:00
Robin Lindén
98b754e1f2
Release 0.2.9 2019-01-12 23:35:54 +01:00
zugz (tox)
0f8f82a3cf
Add cmake option for building additional tests
Closes #1262
2018-12-11 21:49:34 +01:00
iphydf
1eaa55d2d4
Include CTest in CMakeLists.txt to get valgrind support.
We can now run `ctest --output-on-failure -D ExperimentalMemCheck -j 50`
to run valgrind on all tests.
2018-10-17 19:25:33 +00:00
Leonid Bobrov
ed9beef61c
Support DragonFlyBSD and prune unused variables. 2018-10-16 22:01:00 +00:00
chrono
17a7bf3fd2
Add AUTOTEST Option to CMakeLists.txt 2018-10-07 22:09:54 +00:00
Robin Lindén
3f35a84968
Release 0.2.8 2018-10-07 23:21:24 +02:00
Maxim Biro
f5afc52655
Default to not defining MIN_LOGGER_LEVEL in CMake
That way CMake's behavior matches what autotools does -- letting
toxcore/logger.h handle the default case.
2018-10-07 15:15:58 -04:00
Maxim Biro
11e1f63f54
Fix logger level defaulting to TRACE in CMake 2018-10-07 15:15:44 -04:00
iphydf
bfd288c196
Revert "Improve cmake build for MSVC."
This reverts commit f87f8719d0.
2018-09-24 22:25:49 +00:00
Mick Sayson
f87f8719d0
Improve cmake build for MSVC. 2018-09-22 11:14:45 +00:00
Robin Lindén
18117581bd
Release 0.2.7 2018-08-30 22:43:11 +02:00
zugz (tox)
66ab386d6f
try ipv6 connections even after udp timeout
Also adds a test (auto_reconnect_test) which fails without this change.
2018-08-27 22:27:01 +02:00
iphydf
a1035cf814
Add some tests for ping_array.
No timeout test here yet, because we don't yet have the ability to
manipulate time at will, so we would have to actually sleep.
2018-08-26 17:32:19 +00:00
iphydf
2730c95699
Install the DHT_bootstrap binary on make install.
We didn't install it before, only `tox-bootstrapd`.
2018-08-23 21:33:54 +00:00
endoffile78
30960dcc7e
Add save file generator, save compatibility test, and generate a save file 2018-08-19 10:38:51 +00:00
Robin Lindén
31ea1aa06e
Release 0.2.6 2018-08-16 22:45:33 +02:00
iphydf
1de8b020cb
Remove all uses of the PAIR macro in toxav. 2018-08-12 11:38:23 +00:00
Robin Lindén
ffd71e895b
Release 0.2.5 2018-08-08 19:38:31 +02:00
hugbubby
051eb1d5a7
auto_test fixture and filenames
Renamed a poorly named test, fixed up a few printf statements,
substituted some unsigned integers with fixed size counterparts,
and implemmented the auto_run_test.h fixture for the lossy and
lossless packet tests.
2018-07-28 16:14:06 +00:00
hugbubby
c4d58403f9
More fixed_width ints and incorporating file_saving_test.c
The file_saving_test.c was not included in the cmake list
and thus was ignored by travis and "make check". I found this
out while introducing ck_assert_msg into the integration test.

Furthermore, removed some variable width integers from encryptsave_test.c,
and the SRunner utilization. Implemmented ck_assert_msg, reorganized some
loops, and removed some longs in file_transfer_test.c.
2018-07-23 15:10:22 +00:00
iphydf
f627a26a7b
Run Clang global static analysis on Travis.
This uses a single .cc file containing almost all the code in the
repository to perform whole program analysis.
2018-07-22 02:34:30 +00:00
iphydf
7245ac11ef
Avoid implementations in .h files or #including .c files.
Also, avoid the need for putting `_XOPEN_SOURCE` in every test file.
2018-07-21 20:44:26 +00:00
Robin Lindén
a672b3c56e
Release v0.2.4 2018-07-20 22:52:14 +02:00
iphydf
bf79fdbb43
Link -lsocket and -lnsl for socket functions on Solaris.
Also, added some #defines to make symbols visible that are in BSD but not
in UNIX. Solaris needs these, since it's fairly strict with its symbol
visibility in system headers.
2018-07-19 15:05:26 +00:00
iphydf
9eacfafff7
Set C++11/C99 flag manually in older cmake on not-msvc.
These flags are needed so the code actually compiles, so can't only be
set on Travis.
2018-07-15 23:01:32 +00:00
iphydf
beeb9b4335
Style fixes in TCP code; remove MIN and PAIR from util.h.
* Moved PAIR to toxav, where it's used (but really this should die).
* Replace most MIN calls with typed `min_*` calls. Didn't replace the
  ones where the desired semantics are unclear. Moved the MIN macro to
  the one place where it's still used.
* Avoid assignments in `while` loops. Instead, factored out the loop body
  into a separate `bool`-returning function.
* Use named types for callbacks (`_cb` types).
* Avoid assignments in `if` conditions.
* Removed `MAKE_REALLOC` and expanded its two calls. We can't have
  templates in C, and this fake templating is ugly and hard to analyse
  and debug (it expands on a single line).
* Moved epoll system include to the .c file, out of the .h file.
* Avoid assignments in expressions (`a = b = c;`).
* Avoid multiple declarators per struct member declaration.
* Fix naming inconsistencies.
* Replace `net_to_host` macro with function.
2018-07-12 20:21:42 +00:00
iphydf
abc17b0f89
Factor out time keeping code into its own module: mono_time.c.
It turns out, `unix_time` is also monotonic, and is used as such, so I've
renamed the new functions to `mono_time_*`.

2018-07-08:
```
00:01 <@irungentoo> the idea used to be that the unix_time() function
  could go backward in time but I think I might have started using it like
  if it could not after I changed it so that it would never go back in time
```
2018-07-09 21:04:50 +00:00