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: crypto/tls: add RemoteAddr to ConnectionState struct #64782

Open
shlomor25 opened this issue Dec 18, 2023 · 2 comments
Open

proposal: crypto/tls: add RemoteAddr to ConnectionState struct #64782

shlomor25 opened this issue Dec 18, 2023 · 2 comments
Labels
Proposal Proposal-Crypto Proposal related to crypto packages or other security issues
Milestone

Comments

@shlomor25
Copy link

Proposal Details

In certain cases it might be usefuy to have the remote address on the connection state.

For example, I want to validate during handhsake process (VerifyConnection callback) that the peer certificate was issued with the remote address.

type ConnectionState struct {
	...
        RemoteAddr Addr
}
@gopherbot gopherbot added this to the Proposal milestone Dec 18, 2023
@mateusz834
Copy link
Member

How about adding a Conn field instead?

type ConnectionState struct {
	...
        Conn *Conn
}

@shlomor25
Copy link
Author

How about adding a Conn field instead?

type ConnectionState struct {
	...
        Conn *Conn
}

also sounds great. I can use Conn.RemoteAddr()

@seankhliao seankhliao added the Proposal-Crypto Proposal related to crypto packages or other security issues label Dec 18, 2023
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

4 participants