Commit Graph

4296 Commits

Author SHA1 Message Date
Diadlo
b99e99f5d9
Add tests to secure memcmp and memzero functions. 2017-01-04 01:34:20 +03:00
Diadlo
06a68f0f5f
Add secure memcmp and memzero implementation.
Implementation mostly taken from libsodium utils.

Fix #347
2017-01-04 00:40:17 +03:00
Diadlo
6b344c3041
Add CMakeLists.txt.user to gitignore 2017-01-04 00:00:05 +03:00
Sergey 'Jin' Bostandzhyan
4c9ed8f5a0
Add a separate configure switch for DHT_bootstrap
closes #319
2017-01-03 20:42:07 +00:00
Zoff
2ad3ad61b8
Add CircleCI Support 2017-01-03 11:30:57 +00:00
iphydf
4e731bb435
Fix SSL verification in coveralls. 2017-01-02 23:43:42 +00:00
iphydf
4dc38c086d
Remove .cabal-sandbox option from tox-spectest find line.
This was just for finding it in toktok-stack, which now uses
haskell-stack, and thus no longer has a .cabal-sandbox. We'll just assume
that the Makefile properly sets up the path such that tox-spectest is
available.
2016-12-29 11:36:39 +00:00
Nils Fenner
4b32658d56 simplify integration as a third-party lib in cmake projects
The CMAKE_SOURCE_DIR variable points to the top-level directory of a project while we want to point to the top-level directory of the lib. This change simplifies the integration as a third-party lib. We can use CMAKE_CURRENT_SOURCE_DIR or simply "nothing" ('.') to point to the directory where the CMakeLists.txt file resides.
2016-12-28 11:04:27 +01:00
iphydf
a096c71db8
Release v0.1.2 2016-12-23 02:41:01 +00:00
iphydf
ce49e88d33
avoid dereferencing Tox_Options 2016-12-23 00:26:46 +00:00
iphydf
1c20e9f76b
Remove tox_options_copy. 2016-12-22 20:42:47 +00:00
iphydf
db71602731
Use tox_options_set_* instead of direct member access.
Also added a `tox_options_copy` function for cloning an options object.
This can be useful when creating several Tox instances with slightly
varying options.
2016-12-22 10:53:39 +00:00
iphydf
2328cb74ab
Improve documentation of crypto_core. 2016-12-22 10:26:59 +00:00
iphydf
ce29c8e7ec
Wrap all sodium/nacl functions in crypto_core.c. 2016-12-22 10:26:59 +00:00
mannol
7122d2e862 Use after free reported in #278 occurs because toxav_kill()
calls msi_kill() (toxav.c:180) which frees msi_call instances (msi.c:161)
which are then used when call_remove() (toxav.c:1136) is called.
This fix prevents call_remove() from calling invalid pointer.

Fixes #278
2016-12-21 00:16:22 +01:00
iphydf
de623f9eb9
Add test to check if tox_new/tox_kill leaks.
We create and destroy 20k tox instances and run a single tox_iterate on
it. This test is not comprehensive, but provides a simple check to see
whether the destruction properly cleans up memory and perhaps other
resources.
2016-12-20 20:27:51 +00:00
iphydf
5237844877
Avoid array out of bounds read in friend saving.
Fixes #345.
2016-12-20 14:01:23 +00:00
iphydf
c5ced9b2d8
Remove unused get/set salt/key functions from toxencryptsave. 2016-12-19 15:48:24 +00:00
Zetok Zalbavar
4733f849fa
docs(TES): correct docs to reflect how many bytes fns actually require 2016-12-17 19:45:43 +00:00
iphydf
b0647b174c
Release v0.1.1 2016-12-17 00:47:08 +00:00
pranomostro
1a1529c2c5
Add test for obtaining savedata, writing it to a file, reading it again and checking if it was read correctly. 2016-12-16 04:35:25 +00:00
iphydf
bf6db329ac
Strengthen the note about ABI compatibility in tox.h.
We really want to get all clients off this struct. We won't actually
remove it until 0.2, but we're going to break ABI compatibility with this
in various 0.1.x releases.
2016-12-16 03:10:34 +00:00
Gregory Mullen (grayhatter)
4dccd668d2
Drop an unworking Macro
Closes #327
2016-12-15 03:54:58 -08:00
Maxim Biro
68be33840a Add option to disable local peer discovery 2016-12-14 21:48:21 -05:00
iphydf
bbdd798256
Fix unresolved reference in toxencryptsave API.
Also, make sure this won't happen again by checking for it in
format-source.
2016-12-14 11:35:43 +00:00
pchk
22fca79ad7
Fixed attempt to join detached threads 2016-12-14 10:40:54 +00:00
iphydf
7d2f2e4607
Release 0.1.0.
Fixes #216.
2016-12-14 09:35:59 +00:00
iphydf
bb0fbf94ae
Fix Libs line in toxcore.pc pkg-config file.
CMake lists are `;` separated and CMAKE_THREAD_LIBS_INIT contains
"-lpthread". This resulted in "-l-lpthread;-lrt" on Linux.
2016-12-14 01:34:57 +00:00
iphydf
b14b8d07fa
Add compatibility pkg-config modules: libtoxcore, libtoxav.
These were generated by the autotools build. Some clients may depend on
these files instead of the newer split pkg-config files. New clients
should be using the toxcore, toxav, toxencryptsave, and toxdns modules.
2016-12-13 20:58:32 +00:00
iphydf
4cf69996cc
Add apidsl file for toxencryptsave.
This breaks the toxencryptsave API. It hides the Tox_Pass_Key struct
definition.
2016-12-13 14:24:40 +00:00
sudden6
3cfe5544b1
Fix version compatibility test.
Also added some test cases for it.
2016-12-13 02:06:25 +00:00
iphydf
2dc2ac52b9
Fix --enable-logging flag in autotools configure script.
We also never really tested this, because we run make distcheck, which
does another configure with default flags instead of the ones we passed.

Fixes #317.
2016-12-13 00:52:58 +00:00
Robin Lindén
029c4fb83f Fix padding in SAVED_FRIEND struct and add test.
Test covers saving and loading of a Tox instance with a friend added.
2016-12-13 01:36:28 +01:00
iphydf
f208fb53b1
Conditionally enable non-portable assert on LP64.
This only works on LP64. It may fail on Windows, which can be LLP64
(IL32P64).
2016-12-12 19:43:16 +00:00
GDR!
ba476e82bb Merge remote-tracking branch 'upstream/master' 2016-12-12 16:59:37 +01:00
GDR!
c684499375 Move -ltoxcore to be the first linked library 2016-12-12 14:09:34 +01:00
iphydf
c8d7cf5002
Fix off by one error in saving our own status message. 2016-12-10 15:22:06 +00:00
Gregory Mullen (grayhatter)
d68505a2d3
net_crypto give handle_data_packet_helper a better name 2016-12-10 03:02:43 -08:00
Maxim Biro
697530af3b Improve toxencryptsave documentation 2016-12-09 03:01:36 -05:00
iphydf
d8ae726d0a Don't build nTox by default.
Build it on Travis. It won't be built on the windows builds regardless
of having it enabled globally.

Fixes #292.
2016-12-05 22:02:30 +00:00
Gregory Mullen (grayhatter)
d66b3eabd5
rename messenger function, prepend m_ 2016-12-03 13:21:27 -08:00
Maxim Biro
f0f53dbd55 Don't error on warnings by default
Having -Werror set by default causes users' builds to fail because
toxcore is not warning-free. Failing on errors is appropriate for the
development phase, e.g. when building it in a CI enviroment, but it
doesn't make much sense to fail builds for users and let them figure out
that they need to pass -DWARNINGS=OFF to make the library build.
2016-11-28 15:13:01 -05:00
Gregory Mullen (grayhatter)
d6bad9078b
Version Patch v0.0.4 => v0.0.5 2016-11-24 19:55:45 -08:00
Gregory Mullen (grayhatter)
ad517eb1df
add NAT hole punching level to Tox API 2016-11-24 17:38:34 -08:00
Ismael Luceno
19711d0fd0 Add knob to suppress building the nTox client 2016-11-23 22:01:50 -02:00
Ismael Luceno
15993d40a4 Add knob to suppress building the toxav test 2016-11-23 22:01:50 -02:00
iphydf
656f0b9112 Support float32 and float64 in msgpack type printer. 2016-11-21 02:25:11 +00:00
Maxim Biro
551660a64a Fix a memory leak in GroupAV 2016-11-20 20:51:48 -05:00
Maxim Biro
44ac196936 Fix NULL pointer dereference in log calls 2016-11-20 20:32:48 -05:00
Maxim Biro
a403c996b5 Fix a memory leak in hstox interface 2016-11-20 20:14:53 -05:00