Skip to content

Commit

Permalink
add insecure flag for skipping tls certificate check
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerwelin committed Apr 10, 2024
1 parent cbb9d6a commit 5c2cae5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmd/cassowary/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ func validateCLI(c *cli.Context) error {
}

tlsConfig := new(tls.Config)
if c.Bool("insecure") {
tlsConfig.InsecureSkipVerify = true
}

if c.String("ca") != "" {
pemCerts, err := ioutil.ReadFile(c.String("ca"))
if err != nil {
Expand Down Expand Up @@ -329,6 +333,10 @@ func runCLI(args []string) {
Name: "disable-keep-alive",
Usage: "use this flag to disable http keep-alive",
},
&cli.BoolFlag{
Name: "insecure",
Usage: "use this flag to skip ssl verification",
},
&cli.StringFlag{
Name: "ca",
Usage: "ca certificate to verify peer against",
Expand Down

0 comments on commit 5c2cae5

Please sign in to comment.