diff --git a/certcrypto/crypto.go b/certcrypto/crypto.go index 80081ce5..44f6e4d4 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 e2a41a57..bb70da4a 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 } }