Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
drakkan opened this issue Apr 14, 2024 · 2 comments
Open

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

drakkan opened this issue Apr 14, 2024 · 2 comments
Labels
Proposal Proposal-Crypto Proposal related to crypto packages or other security issues
Milestone

Comments

@drakkan
Copy link
Member

drakkan commented Apr 14, 2024

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)
@gopherbot gopherbot added this to the Proposal milestone Apr 14, 2024
@gopherbot
Copy link

Change https://go.dev/cl/578775 mentions this issue: ssh: add NewServerConnContext

@ianlancetaylor ianlancetaylor added the Proposal-Crypto Proposal related to crypto packages or other security issues label Apr 14, 2024
@ianlancetaylor
Copy link
Contributor

CC @golang/security

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Proposal Proposal-Crypto Proposal related to crypto packages or other security issues
Projects
Status: Incoming
Development

No branches or pull requests

3 participants