mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-22 14:11:50 +08:00
Fix for last commit
This commit is contained in:
parent
6ca5828221
commit
626f19a264
|
@ -171,7 +171,14 @@ func (p *ConnectionPolicy) buildStandardTLSConfig(ctx caddy.Context) error {
|
|||
// more at handshake-time, but I don't know how to practically pre-build
|
||||
// a certmagic config for each combination of conn policy + automation policy...
|
||||
cfg := *tlsApp.getConfigForName(hello.ServerName)
|
||||
cfg.CertSelection = p.CertSelection
|
||||
if p.CertSelection != nil {
|
||||
// you would think we could just set this whether or not
|
||||
// p.CertSelection is nil, but that leads to panics if
|
||||
// it is, because cfg.CertSelection is an interface,
|
||||
// so it will have a non-nil value even if the actual
|
||||
// value underlying it is nil (sigh)
|
||||
cfg.CertSelection = p.CertSelection
|
||||
}
|
||||
cfg.DefaultServerName = p.DefaultSNI
|
||||
return cfg.GetCertificate(hello)
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user