Commit Graph
233 Commits
Author SHA1 Message Date
Adrien Béraud e2004d69cb prevent sending listen or announce to unsynched nodes 2015-07-11 18:38:11 -04:00
Adrien Béraud 7a3a95bf3e dht: use time_point::min() as invalid time_point value 2015-07-11 18:38:11 -04:00
Adrien Béraud 5bec9f6764 log cleanup 2015-07-10 23:31:09 -04:00
Adrien Béraud d2c57b867d update copyright headers 2015-07-10 23:25:43 -04:00
Adrien Béraud db1b9c2f38 crypto: add Certificate getName, getIssuerName, getAltNames 2015-07-09 12:32:56 -04:00
Adrien Béraud a0544e8fcf dhtrunner: add future<T> get(key) 2015-07-06 11:27:45 -04:00
Adrien Béraud 2470dab029 dht: add a simpler Done Callback 2015-07-06 11:27:45 -04:00
Adrien Béraud 1bc2c5c9f0 dht: cleanup doc 2015-07-06 11:26:37 -04:00
Adrien Béraud 618f4dcddb crypto: add contructor from blob vector 2015-07-05 17:48:05 -04:00
Adrien Béraud d0f4f57116 dht: fix typo, warnings 2015-07-04 23:56:16 -04:00
Adrien Béraud aee46bced2 configure: add --disable-python, --disable-doc
Allows to control whether to build the Python cython binding
and the Doxygen documentation.
2015-07-04 22:42:08 -04:00
Adrien Béraud d16260eca8 crypto: unpack certificate list from blob vector 2015-07-04 22:41:41 -04:00
Adrien Béraud 6a44dab6d3 crypto: add doc 2015-07-03 13:47:57 -04:00
Adrien Béraud 7959fe3dad crypto: don't use gnutls_global_init with new versions 2015-07-03 13:47:57 -04:00
Adrien Béraud 1c6a50969b crypto: support private key password encryption 2015-07-03 13:45:57 -04:00
Adrien Béraud 8bd46446cd dhtrunner: allow empty or null strings for hostnames 2015-07-02 21:19:34 -04:00
Adrien Béraud aeedb8adac dhtrunner: allow to bind specific IP addresses 2015-07-02 02:59:28 -04:00
Adrien Béraud f05ce4865d dht: round 2 of search performance optimisations
This patch makes search nodes candidates when they failed to reply
to a first message. This allows the search operations to go forward,
while preserving the node opportunity to reply.
2015-07-02 02:59:28 -04:00
Adrien Béraud f1ff9a1a87 dht: optimisations in search behavior
A candidate flag is added to new search nodes when a search
is already synced.
The flag is waived when a token is retreived from the node.
Candidate nodes behave normally but are not considered
to evaluate the search state (synced etc.).

The behavior of searches if also changed so GET_NODES
updates are now done the same way, no matter if the search
is currently synced. This allow candidate nodes to behave
normally and makes token update asynchronous, causing
less frequent performance hickups.
2015-07-02 02:59:28 -04:00
Adrien Béraud 3383ce7a11 dhtnode: print operation completion time 2015-07-02 02:59:28 -04:00
Adrien Béraud 04623d09f8 dht: simplify get search node selection 2015-07-02 02:59:28 -04:00
Adrien Béraud 663f946a3a python: build cython module with autotools 2015-07-02 02:59:28 -04:00
Guillaume Roguez 42ba16d080 add python wrapper written in Cython
This patch adds in tool/python a Cython written package
to use opendht API throught Python language.
This binding is a prototype with a little subset of OpenDHT API,
mainly for a proof-of-concept

Signed-off-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
2015-07-02 02:59:01 -04:00
Adrien Béraud a63fc649b6 refactoring: move Node out of Dht 2015-07-02 02:59:01 -04:00
Adrien Béraud dbde59a355 crypto: add key length param in generateIdentity() 2015-07-02 02:58:42 -04:00
Adrien Béraud 680186976f dht: add node list to done callback 2015-06-25 15:56:03 -04:00
Adrien Béraud e6ab305b33 crypto: use certificate chain again 2015-06-25 15:56:03 -04:00
Adrien Béraud f00071137f doc: add initial doxygen documentation 2015-06-25 11:58:15 -04:00
Adrien Béraud e88e78a2d9 securedht: support external certificate store
With setLocalCertificateStore, add an optional
custom callback to find an immediately available
certificate to use for encryption etc.
2015-06-25 11:50:46 -04:00
Adrien Béraud 428ac04812 crypto: add Certificate::isCA 2015-06-25 11:43:11 -04:00
Adrien Béraud 848d1675b9 infohash: add getBit, setBit, operator< 2015-06-25 11:41:38 -04:00
Adrien Béraud 3e5a3c3f2d dht: getId renamed to getNodeId 2015-06-17 22:34:57 -04:00
Adrien Béraud 40f0488203 dht: address family can be omited in isRunning 2015-06-17 22:34:57 -04:00
Adrien Béraud ca58b19e48 random_device: add some documentation 2015-06-17 15:40:21 -04:00
Adrien Béraud 996d89e2d4 Merge pull request #6 from EckoEdc/patch-4
Fix typo in Makefile.am
2015-06-02 10:44:07 -04:00
Edric 256a3974fd Fix typo in Makefile.am 2015-06-02 10:40:11 -04:00
Adrien Béraud 0497154f7f random_device: support RDSEED and fallback to pseudo rng
Pseudo random numbers are not ideal but still better than zeros.

Use time-seeded PRNG as a basis and XOR-mix with real random numbers if available.
2015-05-31 09:19:24 -04:00
Adrien Béraud 0c1ddba28a Merge pull request #5 from EckoEdc/patch-3
Typo in configure.ac test for mingw32
2015-05-30 15:08:27 -04:00
Edric 7cd8335494 Update configure.ac 2015-05-15 14:40:13 -04:00
cberaud 41406833a8 add crypto::random_device 2015-05-15 19:57:04 +05:30
Guillaume Roguez 98233954c4 dht: drop incoming msg with unknown protocol
We filter out incoming packet if my_v field is not known.
This prevents to be flooded by others bittorrent-like clients.

Signed-off-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
2015-05-14 13:44:11 -04:00
Guillaume Roguez 23961ad9f3 dht: fix buffer-overflow in Dht::blacklistNode
ASAN build shows a buffer-overflow that happens frequently
when blacklistNode tryies to remove blacklisted node from
searches using erase/remove_if std C++ pattern.
This is more frequent using optimized build (gcc -O3).
erase/remove_if pattern is a valid design, so it may be a
failure in stdc++ implementation (not confirmed).
To solve that we fallback to an explicit search loop/erase
pattern.

Signed-off-by: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
2015-05-14 09:28:49 -04:00
Guillaume Roguez b50f368dc8 infohash: fix buffer-overflow
Fix buffer-overflow occuring in InfoHash(const std::string&)
constructor.
2015-05-12 22:50:55 -04:00
Guillaume Roguez 48c10af32f crypto: revert to DER fmt to pack certificate
Seems that Ring is not able to use PEM certificate.
Until we found a right way to use PEM, revert to DER format.
2015-05-01 11:13:35 -04:00
cberaud 06a32eedd1 Certificate: add option to not export the whole chain 2015-04-30 22:02:27 -04:00
Adrien Béraud 892af7a843 crypto: export the actual CAwith the chain 2015-04-30 21:52:38 -04:00
Adrien Béraud ac492aaa7b findCertificate: check for empty function 2015-04-28 11:55:27 -04:00
Adrien Béraud c5c61b838e dht: fix compilation for LLVM 3.5 2015-04-27 15:14:46 -04:00
Adrien Béraud f6c85c7bf5 crypto: remove unwanted overrride 2015-04-27 14:54:38 -04:00
Adrien Béraud bdbc66e0b0 crypto: fix certificate chain export 2015-04-24 15:56:31 -04:00