MCPcopy
hub / github.com/caddyserver/certmagic / getAllMatchingCerts

Method getAllMatchingCerts

cache.go:335–347  ·  view source on GitHub ↗

getAllMatchingCerts returns all certificates with exactly this subject (wildcards are NOT expanded).

(subject string)

Source from the content-addressed store, hash-verified

333// getAllMatchingCerts returns all certificates with exactly this subject
334// (wildcards are NOT expanded).
335func (certCache *Cache) getAllMatchingCerts(subject string) []Certificate {
336 certCache.mu.RLock()
337 defer certCache.mu.RUnlock()
338
339 allCertKeys := certCache.cacheIndex[subject]
340
341 certs := make([]Certificate, len(allCertKeys))
342 for i := range allCertKeys {
343 certs[i] = certCache.cache[allCertKeys[i]]
344 }
345
346 return certs
347}
348
349func (certCache *Cache) getAllCerts() []Certificate {
350 certCache.mu.RLock()

Callers 5

RemoveManagedMethod · 0.95
manageOneMethod · 0.80
selectCertMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected