mirror of
https://github.com/caddyserver/caddy.git
synced 2026-01-17 01:30:34 +00:00
Optionally enforce strict TLS SNI + HTTP Host matching, & misc. cleanup
We should look into a way to enable this by default when TLS client auth is configured for a server
This commit is contained in:
@@ -88,15 +88,16 @@ func (t *TLS) Provision(ctx caddy.Context) error {
|
||||
|
||||
// Start activates the TLS module.
|
||||
func (t *TLS) Start() error {
|
||||
magic := certmagic.New(t.certCache, certmagic.Config{
|
||||
Storage: t.ctx.Storage(),
|
||||
})
|
||||
|
||||
// load manual/static (unmanaged) certificates
|
||||
for _, loader := range t.certificateLoaders {
|
||||
certs, err := loader.LoadCertificates()
|
||||
if err != nil {
|
||||
return fmt.Errorf("loading certificates: %v", err)
|
||||
}
|
||||
magic := certmagic.New(t.certCache, certmagic.Config{
|
||||
Storage: t.ctx.Storage(),
|
||||
})
|
||||
for _, cert := range certs {
|
||||
err := magic.CacheUnmanagedTLSCertificate(cert.Certificate, cert.Tags)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user