validation: option to bypass

This commit is contained in:
Denis Mishin 2023-10-31 19:08:18 -04:00
parent 6511440c2f
commit 63d4c8fbf9
3 changed files with 16 additions and 3 deletions

View file

@ -34,6 +34,10 @@ func (c *CertificatesIndex) Add(cert *x509.Certificate) {
// OverlapsWithExistingCertificate returns true if the certificate overlaps with an existing certificate.
func (c *CertificatesIndex) OverlapsWithExistingCertificate(cert *x509.Certificate) (bool, string) {
if c == nil {
return false, ""
}
usage := getCertUsage(cert)
for _, name := range cert.DNSNames {
if c.match(name, usage) {