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

Method NamesKey

certmagic.go:425–433  ·  view source on GitHub ↗

NamesKey returns the list of SANs as a single string, truncated to some ridiculously long size limit. It can act as a key for the set of names on the resource.

()

Source from the content-addressed store, hash-verified

423// truncated to some ridiculously long size limit. It
424// can act as a key for the set of names on the resource.
425func (cr *CertificateResource) NamesKey() string {
426 sort.Strings(cr.SANs)
427 result := strings.Join(cr.SANs, ",")
428 if len(result) > 1024 {
429 const trunc = "_trunc"
430 result = result[:1024-len(trunc)] + trunc
431 }
432 return result
433}
434
435// Default contains the package defaults for the
436// various Config fields. This is used as a template

Callers 3

obtainCertMethod · 0.95
renewCertMethod · 0.95
saveCertResourceMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected