kairoaraujo / goca

Golang Certificate Authority (CA) package
MIT License
38 stars 14 forks source link

When creating an intermediate CA an HTTP 400 can be returned while retaining the CSR on disk. #31

Open necheffa opened 1 year ago

necheffa commented 1 year ago

When the REST API is accessed to create an intermediate CA, but the parent_common_name field on the payload is omitted, the following error message is returned to the client along with an HTTP 400 status set: {"error":"parent common name is empty when creating an intermediate CA certificate"}

However, getting a listing of $CAPATH on the file system of the server shows that the CSR exists on disk, it just has not been signed by a root CA.

We either want to continue returning an error status but not retain the CSR on the server; or only issue a warning but retain the CSR so that the client can try to manually sign the CSR with a root CA.