CleanUp removes the challenge certificate from the cache, and if it is the last one to finish, stops the TLS server.
(_ context.Context, chal acme.Challenge)
| 225 | // CleanUp removes the challenge certificate from the cache, and if |
| 226 | // it is the last one to finish, stops the TLS server. |
| 227 | func (s *tlsALPNSolver) CleanUp(_ context.Context, chal acme.Challenge) error { |
| 228 | solversMu.Lock() |
| 229 | defer solversMu.Unlock() |
| 230 | si := getSolverInfo(s.address) |
| 231 | si.count-- |
| 232 | if si.count == 0 { |
| 233 | // last one out turns off the lights |
| 234 | atomic.StoreInt32(&si.closed, 1) |
| 235 | if si.listener != nil { |
| 236 | si.listener.Close() |
| 237 | <-si.done |
| 238 | } |
| 239 | delete(solvers, s.address) |
| 240 | } |
| 241 | return nil |
| 242 | } |
| 243 | |
| 244 | // DNS01Solver is a type that makes libdns providers usable as ACME dns-01 |
| 245 | // challenge solvers. See https://github.com/libdns/libdns |
nothing calls this directly
no test coverage detected