mirror of
https://github.com/outbackdingo/labca.git
synced 2026-01-27 18:19:33 +00:00
Cleanup any failed cert creation so it will be retried
This commit is contained in:
@@ -1917,11 +1917,15 @@ func setupHandler(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// 3. Setup root CA certificate
|
||||
if !_certCreate(w, r, "root-ca", true) {
|
||||
// Cleanup the cert (if it even exists) so we will retry on the next run
|
||||
_ := os.Remove("data/root-ca.pem")
|
||||
return
|
||||
}
|
||||
|
||||
// 4. Setup issuer certificate
|
||||
if !_certCreate(w, r, "ca-int", false) {
|
||||
// Cleanup the cert (if it even exists) so we will retry on the next run
|
||||
_ := os.Remove("data/issuer/ca-int.pem")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user