Skip to content

Commit

Permalink
caddytls: remove ClientHelloSNICtxKey (#6326)
Browse files Browse the repository at this point in the history
  • Loading branch information
willnorris authored May 19, 2024
1 parent 9ba9991 commit 1fc151f
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions modules/caddytls/certmanagers.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ func init() {
caddy.RegisterModule(HTTPCertGetter{})
}

// For referencing the requested SNI server name.
const ClientHelloSNICtxKey caddy.CtxKey = "client_hello_sni"

// Tailscale is a module that can get certificates from the local Tailscale process.
type Tailscale struct {
logger *zap.Logger
Expand All @@ -44,7 +41,6 @@ func (ts *Tailscale) Provision(ctx caddy.Context) error {
}

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

0 comments on commit 1fc151f

Please sign in to comment.