RemoveManaged removes managed certificates for the given subjects from the cache. This effectively stops maintenance of those certificates. If an IssuerKey is specified alongside the subject, only certificates for that subject from the specified issuer will be removed.
(subjects []SubjectIssuer)
| 409 | // specified alongside the subject, only certificates for that subject from the |
| 410 | // specified issuer will be removed. |
| 411 | func (certCache *Cache) RemoveManaged(subjects []SubjectIssuer) { |
| 412 | deleteQueue := make([]string, 0, len(subjects)) |
| 413 | for _, subj := range subjects { |
| 414 | certs := certCache.getAllMatchingCerts(subj.Subject) // does NOT expand wildcards; exact matches only |
| 415 | for _, cert := range certs { |
| 416 | if !cert.managed { |
| 417 | continue |
| 418 | } |
| 419 | if subj.IssuerKey == "" || cert.issuerKey == subj.IssuerKey { |
| 420 | deleteQueue = append(deleteQueue, cert.hash) |
| 421 | } |
| 422 | } |
| 423 | } |
| 424 | certCache.Remove(deleteQueue) |
| 425 | } |
| 426 | |
| 427 | // Remove removes certificates with the given hashes from the cache. |
| 428 | // This is effectively used to unload manually-loaded certificates. |
nothing calls this directly
no test coverage detected