forked from TrueCloudLab/lego
csr: support NEW CERTIFICATE REQUEST as CSR type (#1423)
This commit is contained in:
parent
1af3abd16e
commit
e79975cf14
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue