Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 12, 12:00 UTC
caddytls: remove ClientHelloSNICtxKey (#6326)
Will Norris committed
May 18, 2024 at 19:47 UTC
1fc151faec8421bf77c6db8b21880e7bec0d2b02
1 file changed
-4
modules/caddytls/certmanagers.go
-4
@@ -22,9 +22,6 @@ func init() {
22
caddy.RegisterModule(HTTPCertGetter{})
23
}
24
25
-// For referencing the requested SNI server name.
26
-const ClientHelloSNICtxKey caddy.CtxKey = "client_hello_sni"
27
-
25
// Tailscale is a module that can get certificates from the local Tailscale process.
26
type Tailscale struct {
27
logger *zap.Logger
@@ -44,7 +41,6 @@ func (ts *Tailscale) Provision(ctx caddy.Context) error {
41
}
42
43
func (ts Tailscale) GetCertificate(ctx context.Context, hello *tls.ClientHelloInfo) (*tls.Certificate, error) {
47
- ctx = context.WithValue(ctx, ClientHelloSNICtxKey, hello.ServerName)
44
canGetCert, err := ts.canHazCertificate(ctx, hello)
45
if err == nil && !canGetCert {
46
return nil, nil // pass-thru: Tailscale can't offer a cert for this name