1
0
mirror of https://github.com/go-acme/lego.git synced 2025-03-28 16:42:22 +02:00

csr: support NEW CERTIFICATE REQUEST as CSR type ()

This commit is contained in:
Ludovic Fernandez 2021-06-05 13:47:39 +02:00 committed by GitHub
parent 1af3abd16e
commit e79975cf14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions
certcrypto
cmd

@ -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")
}

@ -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
}
}