Commit Graph

270 Commits

Author SHA1 Message Date
jfreegman
a06a736321
Add wrapper library for msgpack pack functions
This allows us to abstract out some of msgpack's quirks
and gives us symmetry with bin_unpack.c
2022-02-11 22:11:32 -05:00
jfreegman
a0a317db49
Split tox_unpack into two smaller libs
tox_unpack is for unpacking Tox types, and bin_unpack is for
unpacking ints and binary data. This prevents us from creating
dependency cycles due to tox_unpack depending on tox.h
2022-02-10 15:34:35 -05:00
jfreegman
73ba0504b0
Add autotest for dht getnodes API
The test creates a small DHT and makes sure that each
peer is able to crawl the full network
2022-02-10 10:33:34 -05:00
Maxim Biro
2965403e2c
Add bash-completion for tox-bootstrapd 2022-02-10 02:40:42 -05:00
iphydf
71d5f8a4c3
chore: Speed up cmake builds with UNITY_BUILD.
`dht_test` breaks with unity build because it includes `DHT.c`. It
really shouldn't do that, but I'm not fixing that in this PR.
2022-02-08 01:07:58 +00:00
iphydf
cb8b9bbabf
feat: Add unpacker functions for events structures. 2022-02-08 00:02:51 +00:00
iphydf
0a2190f28c
feat: Add binary packing functions for tox events. 2022-02-07 02:43:24 +00:00
iphydf
de4af4c270
feat: Add async event handling (callbacks) code.
Instead of synchronously handling events as they happen in
`tox_iterate`, this first collects all events in a structure and then
lets the client process them. This allows clients to process events in
parallel, since the data structure returned is mostly immutable.

This also makes toxcore compatible with languages that don't (easily)
support callbacks from C into the non-C language.

If we remove the callbacks, this allows us to add fields to the events
without breaking the API.
2022-02-06 17:28:28 +00:00
Robin Linden
d93e795cfe
Release 0.2.15 2022-02-06 04:40:03 +01:00
Robin Linden
f41caa2a1e
Release 0.2.14 2022-02-05 22:24:58 +01:00
zugz (tox)
1157e4e68c
Separate run_auto_tests into a library 2022-01-25 14:25:36 -05:00
iphydf
4ce02c0af9
refactor: Deduplicate a bunch of code in TCP client/server.
Also generally a bit of cleanup and better layering.
2022-01-16 09:41:08 +00:00
iphydf
c7ecee7c15
cleanup: Remove old check Suite compat layer.
This doesn't do anything useful for us. It was there so we don't need to
rewrite the tests (which I just did). Finally this is now cleaned up.
2022-01-16 01:37:37 +00:00
iphydf
2671095f4a
cleanup: Merge crypto_core and crypto_core_mem.
The remaining memory functions are small and don't need their own file.
2022-01-15 01:34:14 +00:00
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