Skip to content

Commit

Permalink
set min TLS version
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Labarussias <[email protected]>
  • Loading branch information
Issif authored and poiana committed Jun 8, 2023
1 parent 8f70ba3 commit cb26002
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion outputs/smtp.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ func (c *Client) SendMail(falcopayload types.FalcoPayload) {
return
}
if c.Config.SMTP.TLS {
tlsCfg := &tls.Config{ServerName: strings.Split(c.Config.SMTP.HostPort, ":")[0]}
tlsCfg := &tls.Config{
ServerName: strings.Split(c.Config.SMTP.HostPort, ":")[0],
MinVersion: tls.VersionTLS12,
}
if err := smtpClient.StartTLS(tlsCfg); err != nil {
c.ReportErr("TLS error", err)
return
Expand Down

0 comments on commit cb26002

Please sign in to comment.