Skip to content

proposal: x/crypto/ssh: add NewServerConnContext #66823

Open
@drakkan

Description

@drakkan

Proposal Details

It would be useful for ServerConn to provide a NewServerConnContext method next to NewServerConn.

We have to pass net.Conn to NewServerConn so we can already control deadlines and such externally but I think many of our users just use NewServerConn without thinking about it can hang forever.

// NewServerConnContext is like [NewServerConn] but also accepts a context. The
// provided Context must be non-nil. If the context expires before the handshake
// is complete, an error is returned. Once the handshake is completed, any
// expiration of the context will not affect the connection.
func NewServerConnContext(ctx context.Context, c net.Conn, config *ServerConfig) (*ServerConn, <-chan NewChannel, <-chan *Request, error)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ProposalProposal-CryptoProposal related to crypto packages or other security issues

    Type

    No type

    Projects

    Status

    Incoming

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions