diff --git a/mini-vault/tls.go b/mini-vault/tls.go index 9649b9c..c0f5f1b 100644 --- a/mini-vault/tls.go +++ b/mini-vault/tls.go @@ -85,7 +85,7 @@ func CmdTLSRenew(cmd *cobra.Command, args []string) { } // load existing cert if it existed - if _, err := os.Stat(TLSCertPEM); err == nil { + if info, err := os.Stat(TLSCertPEM); err == nil && info.Size() > 0 { fmt.Printf("Loading existing certificate: %s\n", TLSCertPEM) data, err := os.ReadFile(TLSCertPEM)