From e91dfc40af74df10c3aaab7f04644c7abf66e420 Mon Sep 17 00:00:00 2001 From: James Munnelly Date: Fri, 23 Mar 2018 16:14:41 +0000 Subject: [PATCH] Fix ACME CSR generation --- pkg/issuer/acme/issue.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkg/issuer/acme/issue.go b/pkg/issuer/acme/issue.go index 85cf1382b..f604534ae 100644 --- a/pkg/issuer/acme/issue.go +++ b/pkg/issuer/acme/issue.go @@ -28,10 +28,13 @@ const ( ) func (a *Acme) obtainCertificate(ctx context.Context, crt *v1alpha1.Certificate) ([]byte, []byte, error) { - commonName := crt.Spec.CommonName - altNames := crt.Spec.DNSNames - if len(commonName) == 0 && len(altNames) == 0 { - return nil, nil, fmt.Errorf("no domains specified on certificate") + commonName, err := pki.CommonNameForCertificate(crt) + if err != nil { + return nil, nil, err + } + altNames, err := pki.DNSNamesForCertificate(crt) + if err != nil { + return nil, nil, err } cl, err := a.acmeClient()