Files
Sanaei f727d04f65
Release 3X-UI for Docker / build (push) Canceled after 0s
Release 3X-UI / build (386) (push) Canceled after 0s
Release 3X-UI / build (amd64) (push) Canceled after 0s
Release 3X-UI / build (arm64) (push) Canceled after 0s
Release 3X-UI / build (armv5) (push) Canceled after 0s
Release 3X-UI / build (armv6) (push) Canceled after 0s
Release 3X-UI / build (armv7) (push) Canceled after 0s
Release 3X-UI / build (s390x) (push) Canceled after 0s
Release 3X-UI / Build for Windows (amd64) (push) Canceled after 0s
Release 3X-UI / Publish rolling dev release (push) Canceled after 0s
v3.7.0
2026-08-24 15:07:15 +02:00

20 lines
576 B
Go

package web
import (
"crypto/tls"
"crypto/x509"
)
// applyNodeMtls configures the panel listener to request and verify client
// certificates against pool. It uses VerifyClientCertIfGiven so browsers (which
// present no client cert) keep working; a presented cert that fails to verify
// aborts the handshake. With a nil pool the config is left untouched, so the
// no-mTLS listener is byte-identical to before.
func applyNodeMtls(cfg *tls.Config, pool *x509.CertPool) {
if pool == nil {
return
}
cfg.ClientAuth = tls.VerifyClientCertIfGiven
cfg.ClientCAs = pool
}