Commit Graph

85 Commits

Author SHA1 Message Date
Yusef Napora 7aa706618c add test for peer id mismatch 2020-02-03 10:49:15 -05:00
Yusef Napora 9f6c7d6cde fix peer ID check in IK handshake 2020-02-03 10:24:50 -05:00
Yusef Napora 4d60c61b7c rm debug logs 2020-02-03 10:18:02 -05:00
Yusef Napora 8b7f580cbf don't log all errors
Also, return errors when validating handshake payloads and remote
peer IDs. These were being logged but not returned, so the handshake
would complete successfully even if the payload signature was
invalid
2020-02-03 10:15:20 -05:00
Yusef Napora a1e6857b5c Merge pull request #39 from libp2p/fix/cleanup
use io.ReadFull instead of custom helper
2020-01-29 09:58:58 -05:00
Yusef Napora 268e9e2936 use io.ReadFull instead of custom helper 2020-01-29 09:55:49 -05:00
Yusef Napora 3971c24bec Merge pull request #38 from libp2p/fix/stream-reset
Make sure we actually read and write as much data as we expect
2020-01-29 09:25:31 -05:00
Yusef Napora 7df3fe54e9 make sure we fill buffer when reading from conn
adds fillBuffer and writeAll helpers to make sure that we're actually
filling our input buffers when reading from the insecure conn, and
that we're writing the entire output buffer, even if it takes multiple
calls to insecure.Read or insecure.Write
2020-01-29 09:08:15 -05:00
Yusef Napora 297dd7fae9 send much more data in integration test 2020-01-29 09:08:15 -05:00
Yusef Napora 8c0011194e fix protocol id in integration test 2020-01-29 09:08:15 -05:00
Yusef Napora a57e711592 Merge pull request #36 from libp2p/proto-field-rename
Rename protobuf fields in handshake payload
2020-01-29 08:51:40 -05:00
Yusef Napora a82be49036 rename protobuf fields 2020-01-20 10:37:23 -05:00
Yusef Napora d0ed06d10b add Makefile for generating protobuf code 2020-01-20 10:30:55 -05:00
Yusef Napora e616482ec8 use empty prologue 2020-01-11 09:26:45 -05:00
Yusef Napora 192f8eb236 derive session params from Transport 2019-12-12 16:23:49 -05:00
Yusef Napora eb5f403c33 make Transport and config fields private 2019-12-12 16:23:49 -05:00
Yusef Napora ff835a9cd9 camelCase field names 2019-12-12 16:23:49 -05:00
Yusef Napora f360c666bd move Keypair to its own file 2019-12-12 16:23:17 -05:00
Yusef Napora 8feb08c015 Merge pull request #28 from libp2p/fix/handle-keygen-errors
don't swallow errors from rand.Read
2019-12-12 16:18:57 -05:00
Yusef Napora 8a5063a99d rm redundant check for num bytes read 2019-12-12 15:51:51 -05:00
Yusef Napora c67695a72e don't swallow errors from rand.Read 2019-12-11 19:29:39 -05:00
Yusef Napora fc5d11363d Merge pull request #17 from libp2p/feat/transport-options
use Options to configure transport
2019-12-11 17:27:33 -05:00
Yusef Napora 8ab00e7201 rename constructors 2019-12-11 17:25:40 -05:00
Yusef Napora ca63ecd6bc use Options to configure transport
also, adds NewTransportGenerator for cases when you don't know the
libp2p host key when configuring the Noise transport
2019-12-11 17:25:40 -05:00
Yusef Napora 30b7a7dbbd Merge pull request #27 from libp2p/fix/protocol-id
fix protocol id string
2019-12-11 16:52:46 -05:00
Yusef Napora 8349e50943 fix protocol id string 2019-12-11 16:18:19 -05:00
Yusef Napora b72caed3da guard static key cache with mutex 2019-12-06 15:13:51 -05:00
Yusef Napora 1d0d036ac0 rename imports from ChainSafe to libp2p org 2019-12-06 13:28:22 -05:00
Yusef Napora e360301114 Merge pull request #10 from libp2p/feat/message-chunking
Split large payloads into chunks
2019-12-06 12:47:45 -05:00
Yusef Napora 8f13aa4c1b Merge pull request #9 from libp2p/fix/noise-pipes
Fix noise pipes support
2019-12-06 12:46:40 -05:00
Yusef Napora e9237a8341 split large plaintexts into chunks 2019-12-05 12:16:27 -05:00
Yusef Napora 84d5b558b5 add test for large plaintext payloads 2019-12-05 12:14:30 -05:00
Yusef Napora c3157aaaa1 only set ik_complete = true if IK succeeds 2019-12-05 10:51:37 -05:00
Yusef Napora 423803f233 fix conditional for whether to use IK 2019-12-05 10:51:37 -05:00
Yusef Napora 0a75717944 fix hash function in Noise protocol name 2019-12-05 10:51:37 -05:00
Yusef Napora fdf4c4428c use Errorf instead of Error 2019-12-05 10:51:37 -05:00
Yusef Napora ca9fa6c563 use correct message decoder in XXfallback 2019-12-05 10:51:37 -05:00
Yusef Napora a7d5094883 check right handshake is used in noise pipes tests 2019-12-05 10:51:37 -05:00
Yusef Napora c64dd2c19d fix initiator / responder roles in test setup 2019-12-05 10:51:37 -05:00
noot ace277ee7c change xx name string from blake2s to sha256 2019-11-04 15:58:37 -05:00
noot ba7b4e547c improve log formatting 2019-08-27 03:47:07 -04:00
noot edc89c2210 improve log formatting 2019-08-26 18:18:07 -04:00
noot 618ebb896a fix ik/xx logic, add more tests for ik 2019-08-26 17:27:39 -04:00
noot 062c1b55e6 move keypair generation to constructors, add xxfallback integration test 2019-08-26 16:48:20 -04:00
noot 382b758957 add rw lock, streams functioning 2019-08-26 08:33:22 -04:00
noot aad1bf223e Merge branch 'begin-noise' of github.com:ChainSafe/go-libp2p-noise into begin-noise 2019-08-25 03:46:55 -04:00
noot ce16998805 remove unneeded files 2019-08-25 03:46:24 -04:00
noot 7df7e33044 fix if statement in runHandshake, clean up code 2019-08-25 03:42:29 -04:00
David Ansermino abb6b8bcfd Merge branch 'master' into begin-noise 2019-08-25 03:28:08 +02:00
Ed Mazurek 5897e497e4 presentation (#5) 2019-08-25 03:26:32 +02:00