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 Oct 14, 2021
1 parent a0ccc85 commit 75b10a5
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 @@ -126,7 +126,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 75b10a5

Please sign in to comment.