From 9f0661b6bde79f52ad1cdd681b4b7b2903a463f6 Mon Sep 17 00:00:00 2001 From: J vanBemmel Date: Fri, 17 Dec 2021 09:46:45 -0600 Subject: [PATCH] Check that paths are set --- cmd/tools_cert.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/tools_cert.go b/cmd/tools_cert.go index 04b3b6374..ba33c2814 100644 --- a/cmd/tools_cert.go +++ b/cmd/tools_cert.go @@ -175,6 +175,14 @@ func signCert(_ *cobra.Command, _ []string) error { cfssllog.Level = cfssllog.LevelDebug } + // Check that CA path/key is set + if caCertPath == "" { + return fmt.Errorf("CA cert path not set") + } + if caKeyPath == "" { + return fmt.Errorf("CA key path not set") + } + if path == "" { path, err = os.Getwd() if err != nil {