Alex Stokes
852609c85d
Clean up base session type
2019-08-24 22:38:26 +02:00
Alex Stokes
1adef05e94
Typing and linting fixes
2019-08-24 22:37:45 +02:00
Alex Stokes
23f53ef954
Allow optional peer ID in a security session
2019-08-24 22:37:43 +02:00
Alex Stokes
27c0a4f77b
formatting
2019-08-24 22:37:43 +02:00
Alex Stokes
5b32bfdd3f
Add call to wait_closed
method of asyncio.StreamWriter
2019-08-24 22:06:24 +02:00
Alex Stokes
9c5fb4fa5a
Encapsulate concept of a "stream id" to a "muxed" connection
2019-08-24 21:50:07 +02:00
mhchia
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
mhchia
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
mhchia
a0923d202a
Move varint and delim read/write to toplevel
...
To `libp2p.utils`.
2019-08-22 22:53:46 +08:00
Alex Stokes
2e3ffb9d53
Use types for {Private,Public}Key and address other missing type hints
2019-08-15 16:33:34 -07:00
Alex Stokes
e7d2681fc0
Move base implementations into BaseSession
2019-08-15 16:33:34 -07:00
Alex Stokes
0ebc8ffb21
Wire some missing properties up
2019-08-15 16:33:34 -07:00
Alex Stokes
879cbf1abd
Add an "insecure session" that satisfies the ISecureConn
interface
2019-08-15 16:33:33 -07:00