Commit Graph

9 Commits

Author SHA1 Message Date
5b32bfdd3f Add call to wait_closed method of asyncio.StreamWriter 2019-08-24 22:06:24 +02:00
9c5fb4fa5a Encapsulate concept of a "stream id" to a "muxed" connection 2019-08-24 21:50:07 +02:00
921bfb65cc Verify the remote pubkey and peer_id
- Add `from_bytes` in RSAPublicKey and Secp256k1PublicKey
- Add `pubkey_from_protobuf` to parse pubkey from protobuf
- Verify key and peer_id in `InsecureSession.run_handshake`
2019-08-22 22:53:48 +08:00
ef476e555b Use RawConnection.read
Instead of accessing its reader and writer directly.

TODO: considering add `ReaderWriterCloser` interface and let connection
and stream inherit from it.
2019-08-22 22:53:48 +08:00
a0923d202a Move varint and delim read/write to toplevel
To `libp2p.utils`.
2019-08-22 22:53:46 +08:00
2e3ffb9d53 Use types for {Private,Public}Key and address other missing type hints 2019-08-15 16:33:34 -07:00
e7d2681fc0 Move base implementations into BaseSession 2019-08-15 16:33:34 -07:00
0ebc8ffb21 Wire some missing properties up 2019-08-15 16:33:34 -07:00
879cbf1abd Add an "insecure session" that satisfies the ISecureConn interface 2019-08-15 16:33:33 -07:00