Skip to content

Commit

Permalink
RHINENG-12951: fix CWE-295 'Improper Certificate Validation'
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelMraka committed Oct 4, 2024
1 parent 7142826 commit 4698cdd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions base/mqueue/mqueue_impl_gokafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,8 @@ func tryCreateSecuredDialerFromEnv() *kafka.Dialer {
}

kafkaSslSkipVerify := utils.CoreCfg.KafkaSslSkipVerify
var tlsConfig *tls.Config
if kafkaSslSkipVerify {
tlsConfig = &tls.Config{InsecureSkipVerify: true} // nolint:gosec
} else {
tlsConfig := &tls.Config{InsecureSkipVerify: kafkaSslSkipVerify} // nolint:gosec
if !kafkaSslSkipVerify {
tlsConfig = caCertTLSConfig()
}

Expand Down

0 comments on commit 4698cdd

Please sign in to comment.