Adrien Beraud
7e8c9ce944
dht: use SockAddr& in makeToken
2017-07-16 23:30:58 -04:00
Adrien Beraud
6decb6609a
dht: use uint64_t to store secret
2017-07-16 23:30:58 -04:00
Adrien Beraud
e69d61d8c7
dht: move request to src
2017-07-16 17:45:24 -04:00
Adrien Beraud
61f91d626b
dht: move Storage, Listener out of the Dht class
2017-07-16 15:04:18 -04:00
Adrien Beraud
732d10713d
dht: minor coverity fixes
2017-07-16 13:39:14 -04:00
Adrien Beraud
43ff0e9e52
network engine: handle EAGAIN, ENETUNREACH
...
Handle a few common error codes from send():
* EAGAIN: reschedule without increasing retry count.
This prevent nodes from failing on slow/very slow connections.
* ENETUNREACH, EHOSTUNREACH: expire the node immediately instead
of waiting for an answer, to expire IPv6 nodes quickly if no
IPv6 network is available.
2017-07-15 23:36:33 -04:00
Adrien Beraud
8a123f9f68
network: prevent sending packets larger than 1280 bytes
2017-07-12 11:24:58 -04:00
Simon Désaulniers
b96d0de8a2
python: make use of Filter, Where in DhtRunner.get
2017-06-27 09:59:01 +02:00
Simon Désaulniers
98c4e39ed1
python: expose queries to API
2017-06-26 17:56:44 -04:00
Simon Désaulniers
9c483880cb
value: prevent queries redundant information
2017-06-22 18:39:25 -04:00
Adrien Beraud
39a254ce9f
log: add syslog support
...
Add support to log using standard syslog,
add related option in dhtnode.
dhtnode will use syslog by default
when starting in daemon mode and
no logfile is defined.
2017-05-30 12:20:09 +02:00
Adrien Beraud
37d8481e28
crypto: handle null certificate in getCopy(), getChain()
2017-05-13 17:18:00 -04:00
Adrien Beraud
d9bced965b
crypto: add TrustList move operator, prevent copy
2017-05-01 16:26:12 -04:00
Adrien Beraud
d0a8a92a56
crypto: add GnuTLS trust list wrapper
2017-04-27 04:45:59 +02:00
Adrien Beraud
65de9622fb
crypto: add Certificate::getChainWithRevocations
2017-04-26 16:43:06 +02:00
Adrien Beraud
e8cb635b3a
crypto: add getChain()
2017-04-22 19:48:32 +02:00
Adrien Beraud
f41c8fef99
crypto: unify API across GnuTLS versions
...
Throw an exception if GnuTLS is too old
instead of not providing the API.
Also consistently throw in case of hash error,
and return 0 for an empty hash, for both
PublicKey and Certificate.
2017-04-20 17:07:21 +02:00
Adrien Beraud
79e266aac6
crypto: don't build getLongID() with old gnutls
2017-04-14 16:57:58 +02:00
Adrien Beraud
9d75ed14b4
infohash: add to_c_str(), improve toString() performance
2017-04-10 15:48:04 +02:00
Adrien Beraud
73bcebf355
license cleanup
2017-04-10 01:43:20 +02:00
Adrien Beraud
4132c63faf
def: fix typo
2017-04-09 17:22:18 +02:00
Adrien Beraud
2fc7cc57a9
default types: fix uninitialized fields
2017-04-05 18:15:34 +02:00
Adrien Beraud
732479736b
select: cleanup
2017-04-05 17:52:34 +02:00
Adrien Beraud
696ac1bbd5
network engine: print error if send fails
...
for now just print an error
2017-04-05 17:52:34 +02:00
Adrien Beraud
b73a50bace
pht: prevent unneeded use of shared_ptr
...
Prefer a const reference instead of shared_ptr if the shared_ptr
is not used and argument type is not changed in the method.
This allows to prevent useless shared_ptr allocations.
In getRealPrefix, use OpState to track state instead of using many
different shared_ptr.
2017-04-03 19:10:49 +02:00
Adrien Beraud
70ccbe4e40
value: remove FieldSelectorDescription
...
FieldSelectorDescription is just Value::Field and
adds nothing on top of it.
Remove it in favor of Value::Field.
2017-04-03 19:10:01 +02:00
Adrien Beraud
5823e98c76
rng: add missing header
2017-03-29 03:07:09 +02:00
Adrien Beraud
e2ce496779
crypto: add Certificate::getCopy()
2017-03-29 00:22:19 +02:00
Adrien Beraud
4540be7460
python: add more crypto bindings
2017-03-28 17:33:04 +02:00
Adrien Beraud
7c85b74de6
sockaddr: convert port to network/host byte order
2017-03-28 16:38:28 +02:00
Adrien Beraud
ff6e38571d
dhtrunner: add method to bootstrap with a single SockAddr
2017-03-28 15:44:09 +02:00
Adrien Beraud
36206a80fc
rng: add missing include
2017-03-08 17:50:26 +01:00
Adrien Beraud
ab7d175322
network engine: make buffer length depend on HASH_LEN
2017-03-07 23:14:25 +01:00
Adrien Beraud
802528266a
crypto: add secure_vector and SecureBlob
2017-03-07 23:00:10 +01:00
Adrien Beraud
95d98f4659
rng: add getSeededRandomEngine
...
Add a routine to seed a pseudo-engine to
use the full range of possible internal states
by using seed_seq.
2017-03-07 17:08:46 +01:00
Adrien Beraud
4176302a03
crypto: add PublicKey::toString()
2017-03-07 17:08:46 +01:00
Adrien Béraud
b08b2f14f2
sockaddr: add missing header and typedef
2017-02-17 12:09:33 -05:00
Simon Désaulniers
faf23195a4
dht: standardize announce status check
...
Fixes a bug where some callbacks wouldn't be called when a dummy request was
inserted to cancel some operation while not using the
net::Request::State::COMPLETED flag as per 19c47ec .
2017-02-16 16:29:21 -05:00
Adrien Béraud
c4d5621f67
network: treat loopback address as sender address
...
When learning about nodes in an answer,
we used to drop nodes with loopback address.
Address is now replaced by the packet sender
address and the port is preserved.
2017-02-10 00:10:11 -05:00
Adrien Béraud
aa2227bdfc
SockAddr: add utility methods
2017-02-09 23:49:06 -05:00
Adrien Béraud
93c5ad7cbc
crypto: make Certificate::isCA() more restrictive
2017-02-07 16:51:16 -05:00
Adrien Béraud
ac65ca5177
add shortcut Sp for std::shared_ptr
2017-01-24 23:38:31 -05:00
Adrien Béraud
435cd554e6
securedht: add getLongId()
2017-01-19 12:09:12 -05:00
Adrien Béraud
10c70ebd12
hash: add string I/O
2017-01-19 12:08:49 -05:00
Adrien Béraud
7da3ff1bba
hash: add support for SHA256 public key fingerprints
2017-01-18 16:08:31 -05:00
Adrien Béraud
cabe9dbeb5
dht: declare StorageBucket as class
2017-01-16 17:53:21 -05:00
Adrien Béraud
99b7a07350
sockaddr: make ipCmp comparator const
2017-01-16 17:51:59 -05:00
Simon Désaulniers
b03a8b5b50
update license notice (2017)
2017-01-13 17:27:29 -05:00
Adrien Béraud
32f5175d68
dht: expire storage just on time
2017-01-13 16:06:46 -05:00
Adrien Béraud
7d3a54db57
dht: storage rate limiting
2017-01-13 16:06:46 -05:00