Fix CSR validation for Email SANs
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
This commit is contained in:
parent
267ac50ff0
commit
1c27fcb8d9
@ -188,8 +188,8 @@ func GenerateCSR(crt *v1alpha2.Certificate) (*x509.CertificateRequest, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(commonName) == 0 && len(dnsNames) == 0 && len(uriNames) == 0 {
|
||||
return nil, fmt.Errorf("no common name, DNS name, or URI SAN specified on certificate")
|
||||
if len(commonName) == 0 && len(dnsNames) == 0 && len(uriNames) == 0 && len(crt.Spec.EmailSANs) == 0 {
|
||||
return nil, fmt.Errorf("no common name, DNS name, URI SAN, or Email SAN specified on certificate")
|
||||
}
|
||||
|
||||
pubKeyAlgo, sigAlgo, err := SignatureAlgorithm(crt)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user