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

Set the ServerName field in the ClientHelloInfo when it was unset and a default SNI name is configured #6297

Closed

Conversation

ankon
Copy link
Contributor

@ankon ankon commented May 3, 2024

@ankon
Copy link
Contributor Author

ankon commented May 3, 2024

@@ -232,6 +232,9 @@ func (p *ConnectionPolicy) buildStandardTLSConfig(ctx caddy.Context) error {
cfg.CertSelection = p.CertSelection
}
cfg.DefaultServerName = p.DefaultSNI
if hello.ServerName == "" && p.DefaultSNI != "" {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second validation is kinda redundant right? Worst case scenario you're just setting "" = ""

@mholt
Copy link
Member

mholt commented May 3, 2024

As discussed in Slack, this might be superseded by the default-sni branch in CertMagic which applies this a little more broadly at the cert-management layer.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ ankon
❌ ArturFortunato
You have signed the CLA already but the status is still pending? Let us recheck it.

@mholt
Copy link
Member

mholt commented May 7, 2024

If I understand correctly, the default-sni branch of CertMagic will supersede this, so I'll close this. (But correct me if I'm wrong and we can reopen it. 😃 )

@mholt mholt closed this May 7, 2024
@ankon
Copy link
Contributor Author

ankon commented Oct 26, 2024

Mostly for linking things up: The "default-sni branch" is caddyserver/certmagic#287, which is in certmagic and released with 0.21.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants