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
Adrien Béraud
b6dca5ccd6
dht: use new NodeStats structure to provide stats
2017-01-10 23:34:56 -05:00
Adrien Béraud
23b2712400
dht: use SHA265 instead of SHA512 for the op token
...
The op token is renewed regularly (around every 30 minutes),
so SHA256 provides enough security for this non-sensitive token.
SHA256 takes 32 bytes instead of 64 bytes for SHA512,
and the token is included in every listen requests,
renewed every 30 seconds, and every answer to get.
In the context of limited bandwith usage, using SHA256 seems more appropriate.
This change is backward and forward compatible.
2017-01-10 23:34:56 -05:00
Adrien Béraud
63bec73885
default types: make TrustRequest a map, add confirm field
2017-01-10 14:24:42 -05:00
Simon Désaulniers
620868b5d6
routing_table: complete connecting state resolution
...
After a connectivity change, the DHT would enter the "connecting" state in order
to try to resolve good nodes. However, the previous algorithm would
probabilistically increase time for completion each time a node would fail to
resolve. We now avoid this by prioritizing non-expired nodes in the process.
Also, a subtle error would sensibly stop the process for 30 minutes due to using
the Node::NODE_EXPIRE_TIME constant instead of Node::MAX_RESPONSE_TIME.
2017-01-03 17:48:40 -05:00
Adrien Béraud
38aa86de2a
crypto/crl: add getIssuerName, getIssuerUID
2016-12-29 11:19:27 -05:00
Guillaume Roguez
d6e86ebcc9
remove InfoHash::toCString()
...
Implementation of InfoHash::toCString() is broken
2016-12-06 18:28:14 -05:00
Adrien Béraud
197aaa47f0
crypto: prevent duplicate CRLs, reimport after signing
2016-12-06 16:59:54 -05:00
Adrien Béraud
ad234004aa
crypto: store CRLs in a set
2016-12-05 15:43:00 -05:00
Adrien Béraud
a88e6a4c5f
crypto: make CRL default expiration same as certificate
2016-12-02 12:59:03 -05:00
Adrien Béraud
c776dad96f
crypto: add Certificate::getExpiration()
2016-12-02 12:58:10 -05:00
Adrien Béraud
31fedd529b
crypto: add CRL msgpack serialization
2016-12-01 18:42:26 -05:00
Adrien Béraud
e9adff9dc5
crypto: add CRL move operator, export as DER
2016-11-30 17:30:09 -05:00
Adrien Béraud
bfd58a204b
crypto: add CRL import/export methods
2016-11-30 16:31:29 -05:00
Adrien Béraud
867bcf1514
crypto: add EC key generation
2016-11-29 18:04:25 -05:00
Adrien Béraud
fb882ee440
crypto: add revocation list
2016-11-29 18:03:49 -05:00
Adrien Béraud
f73f5e2798
log: cosmetics
2016-11-29 01:27:42 -05:00
Istvan
e7db64bd74
Log functions are moved to log.cpp
...
Log functions are moved to the log.cpp
in order to avoid multiple definitions
of the logger functions.
2016-11-29 00:50:47 -05:00
Adrien Béraud
8a5de47aa0
hide symbols by default ( #140 )
2016-11-23 18:27:24 -05:00
Adrien Béraud
7f84c1e397
utils: remove useless definitions
2016-11-23 15:12:37 -05:00
Guillaume Roguez
297c37e609
infohash: add helper to C string format conversion
...
This const void* convertion method helps a lot with programs
that need to print the hash with a printf() like function.
2016-11-08 15:26:13 -05:00
Simon Désaulniers
9bb1ab43eb
net.h: moved to include/opendht/
2016-11-08 14:52:09 -05:00
Simon Désaulniers
ab7d1d6582
dht,net: introduce socket, support multiple listen
...
Since the initial implementation of listen operation, multiple listen requests
from a single node on a same hash was not possible without singular
inconsistencies. The flaw was coming from the fact that nodes receiving listen
request could not differentiate between listen refresh request and a new
independent listen request.
This patch introduces the new net::Socket structure which in time will enable
remote nodes to send update for a storage while differentiating between
concurrent listen requests. A socket has a unique identifier which consists of a
transaction id as defined in the OpenDHT protocol.
2016-11-07 06:44:15 -05:00
Simon Désaulniers
77ea6d8c2f
net: create net namespace, moving relevant structs
2016-11-05 19:29:00 -04:00
Adrien Béraud
b2529c241e
log: flush on new line
2016-11-01 03:13:56 -04:00
Adrien Béraud
83c47037d2
dht: remove unimplemented declaration
2016-11-01 03:13:56 -04:00
Adrien Béraud
125b6f9236
dht: make storage maintenance optional, default disabled
2016-10-31 14:43:56 -04:00
Adrien Béraud
e260ba6b78
infohash: remove misused restrict
2016-10-31 12:35:50 -04:00
Adrien Béraud
c3d3da20f6
Merge pull request #146 from sim590/permanent-put-enhancement
...
dht: make reannounce margin bigger, safer
2016-10-28 16:24:07 -04:00
Simon Désaulniers
9404a4d069
dht: make reannounce margin bigger, safer
...
Reannouncing margin going from 5 seconds to 10 seconds.
2016-10-28 15:24:09 -04:00
Adrien Béraud
274621dcec
dht: add searches(sa_family)
2016-10-27 18:12:05 -04:00
Adrien Béraud
2ab756906d
dht: getSearchLog for a specific search
2016-10-27 16:51:21 -04:00
Adrien Béraud
2b3f63443f
dht: maintain each storage independently
...
Schedule every storage maintenance independently,
to improve performance when there are a lot of storages.
2016-10-27 14:21:52 -04:00
Simon Désaulniers
7ee6281426
log: display time before each line in log
2016-10-25 16:40:48 -04:00
Adrien Béraud
e3663c995a
log: add storage filter
2016-10-24 02:09:38 -04:00
Adrien Béraud
1d62b3ca64
log: add InfoHash filter
...
* filter log entries with new method setLogFilter
* filter by node id, search or infohash
* add optional parameter to 'log' in dhtnode
2016-10-24 02:09:38 -04:00
Adrien Béraud
70b1ebae0b
dht: fix scheduler job edition on clang
2016-10-21 17:44:39 -04:00
Adrien Béraud
d4bd17a2dc
dhtrunner: use a second condition variable for bootstrap
2016-10-19 13:34:33 -04:00
Simon Désaulniers
6743cbbf50
dht: introduce "refresh" operation
...
This operation requests a node to refresh a value's time_point information of
its lifetime begining. This is intended to fix the *permanent put* operation
which has been having syncing issues since the introduction of an enhanced and
lighter put operation.
2016-10-17 11:56:54 -04:00
Adrien Béraud
f233340cb2
node: clear reply_time on reset
2016-10-16 22:36:36 -04:00
Adrien Béraud
cfb817d37f
dht: add buckets() utility
2016-10-16 22:36:30 -04:00