Merge pull request #309 from aluzzardi/tls-flags-fix

Abort if --tlscert, --tlskey or --tlscacert are used without --tls.
This commit is contained in:
Victor Vieux 2015-01-26 17:46:39 -08:00
commit b99bcb0ee1
1 changed files with 6 additions and 0 deletions

View File

@ -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"))