From 8c2373a633c81868cd686b2effb317d3f2ca02fe Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Mon, 26 Jan 2015 17:10:13 -0800 Subject: [PATCH] Abort if --tlscert, --tlskey or --tlscacert are used without --tls. Fixes #296 Signed-off-by: Andrea Luzzardi --- manage.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/manage.go b/manage.go index 78470b0b8a..488a3c1dcc 100644 --- a/manage.go +++ b/manage.go @@ -77,6 +77,12 @@ func manage(c *cli.Context) { if err != nil { log.Fatal(err) } + } else { + // Otherwise, if neither --tls nor --tlsverify are specified, abort if + // the other flags are passed as they will be ignored. + if c.IsSet("tlscert") || c.IsSet("tlskey") || c.IsSet("tlscacert") { + log.Fatal("--tlscert, --tlskey and --tlscacert require the use of either --tls or --tlsverify") + } } store := state.NewStore(path.Join(c.String("rootdir"), "state"))