DoAltDNSNamesMatch checks if the certificate has all of the specified altDNSNames
(altDNSNames []string)
| 342 | |
| 343 | // DoAltDNSNamesMatch checks if the certificate has all of the specified altDNSNames |
| 344 | func (pair *KeyPair) DoAltDNSNamesMatch(altDNSNames []string) (bool, error) { |
| 345 | cert, err := pair.ParseCertificate() |
| 346 | if err != nil { |
| 347 | return false, err |
| 348 | } |
| 349 | |
| 350 | sort.Strings(cert.DNSNames) |
| 351 | sort.Strings(altDNSNames) |
| 352 | |
| 353 | return slices.Equal(cert.DNSNames, altDNSNames), nil |
| 354 | } |
| 355 | |
| 356 | // CreateDerivedCA create a new CA derived from the certificate in the |
| 357 | // keypair |
no test coverage detected