Skip to content

Commit

Permalink
csr: support NEW CERTIFICATE REQUEST as CSR type (#1423)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez authored Jun 5, 2021
1 parent 1af3abd commit e79975c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion certcrypto/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit e79975c

Please sign in to comment.