• Dave Cheney's avatar
    go.crypto/ssh: ensure {Server,Client}Conn do not expose io.ReadWriter · a2a307ee
    Dave Cheney authored
    Transport should not be a ReadWriter. It can only write packets, i.e. no partial reads or writes. Furthermore, you can currently do ClientConn.Write() while the connection is live, which sends raw bytes over the connection. Doing so will confuse the transports because the data is not encrypted.
    As a consequence, ClientConn and ServerConn stop being a net.Conn
    Finally, ensure that {Server,Client}Conn implement LocalAddr and RemoteAddr methods that previously were exposed by an embedded net.Conn field.
session.go 15 KB