585 Commits

Author SHA1 Message Date
James Ray
45cd7db6e9 Remove spaces before semicolons (#591) 2018-10-29 10:38:32 +01:00
Toralf Wittner
585c90a33c
Add protocol to report external address view. (#566)
Add protocol to report external address view.

Address part of #443.
2018-10-28 11:02:26 +01:00
jamartin9
490ae980c7 #399 remove tokio_current_thread tests (#577)
* remove tokio_current_thread tests

* Review changes:
Removed newline
Moved uds tokio test crate to top to avoid self and keep with convention of other test crates
Removed sleep from uds test and block until all futures are completed.
2018-10-25 11:26:37 +02:00
Pierre Krieger
46dd6b61b2
Fix panicking when Kad responder is destroyed (#575) 2018-10-18 17:03:47 +01:00
Pierre Krieger
1e223f627d
Remove other unused files (#570) 2018-10-18 15:21:14 +01:00
Pierre Krieger
5d1c54cc10
New core (#568)
* New core

* Fix lifetime requirements

* Remove identify transport

* Address &mut & ref ref mut

* Fix whitespaces
2018-10-17 10:17:40 +01:00
Pierre Krieger
68632ce26b
Fix secio compied with --no-default-features (#545) 2018-10-09 11:21:35 +02:00
Toralf Wittner
f2c3a149d7
Model HandshakeContext with explicit state transitions. (#532)
Instead of having one struct with uninitialised fields
which are mutated, have explicit states and ensure that the types
show that there is no ambiguity which data is available or not.
Consequently, this removes quite a few `unwrap`/`expect` calls.
2018-10-08 14:37:36 +02:00
Pierre Krieger
c032afbde5
Implement GET_PROVIDERS/ADD_PROVIDER Kademlia messages (#530)
* Implement GET_PROVIDERS/ADD_PROVIDER Kademlia messages

* Use multihash and peer id in protocol.rs

* Fix Kademlia example
2018-10-01 18:40:35 +02:00
Pierre Krieger
e3efc2dc9a
Make secio almost compile for asmjs/wasm (#519)
* Use the sha2 crate in the handshake

* Return a Digest in algo_support instead of a ring ref

* Switch to ed25519-dalek for keys

* Make ring more or less optional

* Switch to ed25519_dalek for the verification

* Extract the key exchange to its own module

* Remove the ring RNG from the handshake

* Some warning fixes and forgot file

* Move key exchange to own module

* Remove usage of ring::digest

* Remove ring from handshake entirely

* Implement ECDH for WebCrypto

* Remove the libp2p-secio feature

* Fix ring being included

* Address some concerns

* Provde some panics in WebCrypto

* Prove the Hmac panic

* Prove more panics
2018-10-01 15:42:40 +02:00
Pierre Krieger
a9eefe1015
Remove notifying tasks (#528) 2018-10-01 11:18:00 +02:00
Qian LinFeng
4fa680e282 Upgrade smallvec version to fix license issue (#526) 2018-09-30 16:18:19 +02:00
James Ray
bf066773e3 ybsubscribing -> unsubscribing (#513) 2018-09-24 09:32:20 +02:00
Pierre Krieger
a988926c3e
Fix the ping dialer never closed (#504)
* Fix the ping dialer never closed

* Fix not ready
2018-09-21 10:06:04 +02:00
Pierre Krieger
4d8da24c64
Fix the Default implementation of Ping (#501) 2018-09-20 19:53:31 +02:00
Toralf Wittner
84b089cacc
Refactor multiaddr crate. (#498)
Refactor multiaddr crate.

- Remove `AddrComponent`. Instead `Protocol` directly contains its
associated data.

- Various smaller changes around conversions to Multiaddr from other
types, e.g. socket addresses.

- Expand tests to include property tests which test encoding/decoding
identity.
2018-09-20 19:51:00 +02:00
Pierre Krieger
1969bde4fe
Rework the Ping protocol (#497)
* Rework the Ping upgrade

* Fix concerns
2018-09-20 16:55:57 +02:00
Toralf Wittner
7fb09fbf20
secio: keep ciphertext if start_send is not ready (#494)
* secio: keep ciphertext if start_send is not ready

Otherwise ciphertext may be thrown away and once sent, the cipher states
have diverged, resulting in nonsense messages on decryption side.

* Also attempt to send pending data `Sink::close`.

* Inline `send_pending`.
2018-09-18 22:51:13 +02:00
Pierre Krieger
0c43c76965
Implement close() from Sink (#492) 2018-09-17 15:01:37 +02:00
Pierre Krieger
d719ac6037
Revert "Revert "remove rustc-serialize (#359) (#386)" (#466)" (#477)
This reverts commit 0a3d4cdfade1656d72ca99751e94e179bdaec221.
2018-09-17 10:05:37 +02:00
Toralf Wittner
0614b0d44e
secio: don't panic in agree_ephemeral. (#480)
Given that echoing back our local key and nonce would result in equal
digest values, we should treat this as an error instead of panicking.
2018-09-14 11:37:40 +02:00
Toralf Wittner
b2756c8fa9
Make Multiaddr::iter borrow data (#478)
* Use `unsigned-varint` crate.

* Implement `Display` for `Protocol`.

Gives `ToString` for free.

* Use `Cow` in `AddrComponent`.

* Add `AddrComponent::acquire`.

* Document `AddrComponent::acquire`.
2018-09-14 10:21:14 +02:00
Arkadiy Paronyan
5980a4538e
Secp256k1 key generation (#474) 2018-09-13 10:26:52 +02:00
Toralf Wittner
6a5681aed7
secio: Add NULL cipher and allow more configuration. (#468)
* Introduce NULL cipher and allow more configuration.

* Back to using the hash-code for handshake.

Using `Endpoint` would be incompatible with the existing protocol.

* Add comments.
2018-09-12 09:10:05 +02:00
Pierre Krieger
304e9c72c8
Report the entire peers after a result (#467) 2018-09-07 16:46:34 +02:00
Pierre Krieger
0a3d4cdfad
Revert "remove rustc-serialize (#359) (#386)" (#466)
This reverts commit 73996885cb2d645ee91361204c33e7039290aabc.
2018-09-07 14:05:42 +02:00
Pierre Krieger
e45dce2d9a
Switch to twofish by default (#465) 2018-09-06 17:35:25 +02:00
Pierre Krieger
601de6ab70
Minor fix for concat_comma (#464) 2018-09-06 16:31:15 +02:00
Pierre Krieger
ea1f172397
Implement Send everywhere (#458) 2018-09-06 09:54:35 +02:00
Pierre Krieger
e2960b4317
Add support for twofish cipher (#457) 2018-09-05 02:15:16 +02:00
Guanqun Lu
ee9be6f0c9 add must_use for Future (#450) 2018-09-04 12:30:57 +02:00
Pierre Krieger
02576eecf1
Downgrade ring to 0.12 (#448) 2018-09-03 20:44:55 +02:00
Toralf Wittner
cd1d81b5d0
Update unsigned-varint crate to v0.2.0 (#447) 2018-09-03 17:19:03 +02:00
Eugene Chupriyanov
4798952e2f Fix rust-libp2p issue #429 (floodsub fails to decode PeerId) (#430) 2018-08-29 11:37:07 +02:00
Benjamin Kampmann
2ea49718f3
Clean up directory structure (#426)
* Remove unused circular-buffer crate
* Move transports into subdirectory
* Move misc into subdirectory
* Move stores into subdirectory
* Move multiplexers
* Move protocols
* Move libp2p top layer
* Fix Test: skip doctest if secio isn't enabled
2018-08-29 11:24:44 +02:00