From eb892ba54a95ef631320f3ea4a8bb2882a0f5488 Mon Sep 17 00:00:00 2001 From: Arjan H Date: Sun, 31 Jul 2022 11:16:52 +0200 Subject: [PATCH] Cleanup any failed cert creation so it will be retried --- gui/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gui/main.go b/gui/main.go index 9d994c4..c049411 100644 --- a/gui/main.go +++ b/gui/main.go @@ -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 }