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.
()
| 423 | // truncated to some ridiculously long size limit. It |
| 424 | // can act as a key for the set of names on the resource. |
| 425 | func (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 |
no outgoing calls
no test coverage detected