1
1
Fork 0
mirror of https://github.com/mjl-/mox.git synced 2025-03-24 18:54:47 +03:00

ensure kind "acme-tls-alpn-01" is registered on the http handler

previous code couldn't possibly be triggered by my reading.

encountered during PR 
This commit is contained in:
Mechiel Lukkien 2025-01-13 10:43:55 +01:00
parent eb88e2651a
commit b8bf99e082
No known key found for this signature in database

View file

@ -596,12 +596,13 @@ func portServes(l config.Listener) map[int]*serve {
if https && l.TLS.ACME != "" {
s.TLSConfig = l.TLS.ACMEConfig
} else if https {
s.TLSConfig = l.TLS.Config
if l.TLS.ACME != "" {
tlsport := config.Port(mox.Conf.Static.ACME[l.TLS.ACME].Port, 443)
tlsport := config.Port(mox.Conf.Static.ACME[l.TLS.ACME].Port, 443)
if portServe[tlsport] == nil || !slices.Contains(portServe[tlsport].Kinds, "acme-tls-alpn-01") {
ensureServe(true, tlsport, "acme-tls-alpn-01", false)
}
} else if https {
s.TLSConfig = l.TLS.Config
}
return s
}