Closed
Description
This enhancement is the go/TLS implementation of the spec#446; which is tracked by #426.
The core idea is to perform muxer selection in the security protocol handshake process, rather than selecting muxer in a separate multistream-selection round.
In order to implement this enhancement, I am planning to do the following:
- Extend the ConnSecurity interface by adding a method for retrieving early data negotiated by the security protocol. This interface is implemented by several security layer data types, including TLS, Noise, and Insecure.
type ConnSecurity interface {
// LocalPeer returns our peer ID
LocalPeer() peer.ID
type ConnSecurity interface {
// LocalPeer returns our peer ID
LocalPeer() peer.ID
// LocalPrivateKey returns our private key
LocalPrivateKey() ic.PrivKey
// RemotePeer returns the peer ID of the remote peer.
RemotePeer() peer.ID
// RemotePublicKey returns the public key of the remote peer.
RemotePublicKey() ic.PubKey
**// Early data negotiated by the security protocol. Empty if not supported.
EarlyData() string**
}
- Extend the Transport data type of multistream-muxer and add method to expose the muxer strings that are stored here.
- Introduce some coupling between the Multistream-muxer and security layer in the upgrader-code, to pass the supported muxers into security protocols.
- After security handshake is down, the early data result will be available by the method added in step 1.
- Upgrader logic is revised to use the early data, if available, to select muxer.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
🎉 Done