Fix validation in CSR
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
This commit is contained in:
parent
918e1e04f3
commit
52bda8a33f
@ -193,7 +193,7 @@ func GenerateCSR(crt *v1.Certificate) (*x509.CertificateRequest, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(commonName) == 0 && len(dnsNames) == 0 && len(uriNames) == 0 && len(crt.Spec.EmailAddresses) == 0 {
|
||||
if len(commonName) == 0 && len(dnsNames) == 0 && len(uriNames) == 0 && len(crt.Spec.EmailAddresses) == 0 && len(crt.Spec.IPAddresses) == 0 {
|
||||
return nil, fmt.Errorf("no common name, DNS name, URI SAN, or Email SAN specified on certificate")
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user