Skip to content

Commit

Permalink
Fix mysql insecure hostname verify didn't work (#4569)
Browse files Browse the repository at this point in the history
  • Loading branch information
git-hulk authored and longquanzheng committed Oct 14, 2021
1 parent cdfbd38 commit e710c0f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common/persistence/sql/sqlplugin/mysql/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ func registerTLSConfig(cfg *config.SQL) error {

// TODO: create a way to set MinVersion and CipherSuites via cfg.
tlsConfig := &tls.Config{
ServerName: host,
ServerName: host,
InsecureSkipVerify: !cfg.TLS.EnableHostVerification,
}

if cfg.TLS.CaFile != "" {
Expand Down

0 comments on commit e710c0f

Please sign in to comment.