Skip to content

Commit 1fc151f

Browse files
authored
caddytls: remove ClientHelloSNICtxKey (#6326)
1 parent 9ba9991 commit 1fc151f

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

modules/caddytls/certmanagers.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ func init() {
2222
caddy.RegisterModule(HTTPCertGetter{})
2323
}
2424

25-
// For referencing the requested SNI server name.
26-
const ClientHelloSNICtxKey caddy.CtxKey = "client_hello_sni"
27-
2825
// Tailscale is a module that can get certificates from the local Tailscale process.
2926
type Tailscale struct {
3027
logger *zap.Logger
@@ -44,7 +41,6 @@ func (ts *Tailscale) Provision(ctx caddy.Context) error {
4441
}
4542

4643
func (ts Tailscale) GetCertificate(ctx context.Context, hello *tls.ClientHelloInfo) (*tls.Certificate, error) {
47-
ctx = context.WithValue(ctx, ClientHelloSNICtxKey, hello.ServerName)
4844
canGetCert, err := ts.canHazCertificate(ctx, hello)
4945
if err == nil && !canGetCert {
5046
return nil, nil // pass-thru: Tailscale can't offer a cert for this name

0 commit comments

Comments
 (0)