Commit Graph

11 Commits

Author SHA1 Message Date
Juan Batiz-Benet
175af5227f secio: threadsafe
clients were already accessing secio in one thread, but it's
safer to make sure it _is_ threadsafe
2015-01-01 19:48:05 -08:00
Juan Batiz-Benet
293ea03eb0 secio: buffer remainders in calls to Read()
used to return io.ErrShortBuffer, but this makes client
code much more complicated. we're already allocating
buffers when it's too large, so might as well just
keep it for later.
2015-01-01 07:05:39 -08:00
Juan Batiz-Benet
c84a714b16 peer change: peer.Peer -> peer.ID
this is a major refactor of the entire codebase
it changes the monolithic peer.Peer into using
a peer.ID and a peer.Peerstore.

Other changes:
- removed handshake3.
-	testutil vastly simplified peer
-	secio bugfix + debugging logs
-	testutil: RandKeyPair
-	backpressure bugfix: w.o.w.
-	peer: added hex enc/dec
-	peer: added a PeerInfo struct
  PeerInfo is a small struct used to pass around a peer with
 	a set of addresses and keys. This is not meant to be a
 	complete view of the system, but rather to model updates to
 	the peerstore. It is used by things like the routing system.
-	updated peer/queue + peerset
-	latency metrics
-	testutil: use crand for PeerID gen
 	RandPeerID generates random "valid" peer IDs. it does not
 	NEED to generate keys because it is as if we lost the key
 	right away. fine to read some randomness and hash it. to
 	generate proper keys and an ID, use:
 	  sk, pk, _ := testutil.RandKeyPair()
 	  id, _ := peer.IDFromPublicKey(pk)
 	Also added RandPeerIDFatal helper
- removed old spipe
- updated seccat
- core: cleanup initIdentity
- removed old getFromPeerList
2014-12-23 08:33:32 -08:00
Juan Batiz-Benet
3b29653022 updated msgio + secio 2014-12-16 05:10:45 -08:00
Juan Batiz-Benet
881f5c9883 secio unexpose bufPool 2014-12-12 03:33:09 -08:00
Juan Batiz-Benet
e7edeca392 added log.Events to secio 2014-12-12 03:29:09 -08:00
Brian Tiger Chow
67665069d1 Update interface.go 2014-12-12 03:10:47 -08:00
Brian Tiger Chow
24308148ad Update interface.go 2014-12-12 03:10:25 -08:00
Juan Batiz-Benet
9267f45085 secio: encrypt copy
sadly, encrypting needs to copy, as the user supplied buffer
must not be mangled.
2014-12-12 02:47:37 -08:00
Juan Batiz-Benet
8d961fc03b secio: better handshake log msg 2014-12-12 02:47:36 -08:00
Juan Batiz-Benet
5aab08fe4f secio -- spipe v2
This commit introduces secio, the next generation spipe.
2014-12-12 02:45:23 -08:00