mirror of
https://github.com/shirou/mqttcli.git
synced 2025-04-26 13:49:17 +08:00
change default value of insecure to "false"
This commit is contained in:
parent
663706e77a
commit
e675cccfaf
4
mqtt.go
4
mqtt.go
@ -113,11 +113,11 @@ func NewOption(c *cli.Context) (*MQTT.ClientOptions, error) {
|
||||
}
|
||||
tlsConfig.RootCAs = certPool
|
||||
}
|
||||
insecure := true
|
||||
insecure := c.Bool("insecure")
|
||||
if insecure {
|
||||
tlsConfig.InsecureSkipVerify = true
|
||||
opts.SetTlsConfig(tlsConfig)
|
||||
}
|
||||
opts.SetTlsConfig(tlsConfig)
|
||||
|
||||
user := c.String("u")
|
||||
if user != "" {
|
||||
|
Loading…
x
Reference in New Issue
Block a user