diff --git a/certcrypto/crypto.go b/certcrypto/crypto.go index 80081ce550..44f6e4d4e2 100644 --- a/certcrypto/crypto.go +++ b/certcrypto/crypto.go @@ -179,7 +179,7 @@ func PemDecodeTox509CSR(data []byte) (*x509.CertificateRequest, error) { return nil, err } - if pemBlock.Type != "CERTIFICATE REQUEST" { + if pemBlock.Type != "CERTIFICATE REQUEST" && pemBlock.Type != "NEW CERTIFICATE REQUEST" { return nil, errors.New("PEM block is not a certificate request") } diff --git a/cmd/setup.go b/cmd/setup.go index e2a41a57e4..bb70da4aa4 100644 --- a/cmd/setup.go +++ b/cmd/setup.go @@ -117,7 +117,7 @@ func readCSRFile(filename string) (*x509.CertificateRequest, error) { } // did we get a CSR? - if p.Type == "CERTIFICATE REQUEST" { + if p.Type == "CERTIFICATE REQUEST" || p.Type == "NEW CERTIFICATE REQUEST" { raw = p.Bytes } }