mirror of
https://github.com/docker/docs.git
synced 2026-04-04 18:28:58 +07:00
Abort if dependent TLS flags are not passed.
Fixes #296 Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
@@ -63,6 +63,12 @@ func manage(c *cli.Context) {
|
||||
|
||||
// If either --tls or --tlsverify are specified, load the certificates.
|
||||
if c.Bool("tls") || c.Bool("tlsverify") {
|
||||
if !c.IsSet("tlscert") || !c.IsSet("tlskey") {
|
||||
log.Fatalf("--tlscert and --tlskey must be provided when using --tls")
|
||||
}
|
||||
if c.Bool("tlsverify") && !c.IsSet("tlscacert") {
|
||||
log.Fatalf("--tlscacert must be provided when using --tlsverify")
|
||||
}
|
||||
tlsConfig, err = loadTlsConfig(
|
||||
c.String("tlscacert"),
|
||||
c.String("tlscert"),
|
||||
|
||||
Reference in New Issue
Block a user