Skip to content

Commit

Permalink
nosec G402 comment added to tls.InsecureSkipVerify option
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir D committed Nov 27, 2023
1 parent 28b69ef commit 6fe9f00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion email.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func (em *Sender) String() string {
func (em *Sender) client() (c *smtp.Client, err error) {
srvAddress := fmt.Sprintf("%s:%d", em.host, em.port)
tlsConf := &tls.Config{
InsecureSkipVerify: em.insecureSkipVerify,
InsecureSkipVerify: em.insecureSkipVerify, // #nosec G402

Check failure on line 176 in email.go

View workflow job for this annotation

GitHub Actions / build

G402: TLS InsecureSkipVerify may be true. (gosec)
ServerName: em.host,
MinVersion: tls.VersionTLS12,
}
Expand Down
2 changes: 1 addition & 1 deletion options.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func STARTTLS(enabled bool) Option {
}
}

// Skip certificate verification support
// InsecureSkipVerify skips certificate verification
func InsecureSkipVerify(enabled bool) Option {
return func(s *Sender) {
s.insecureSkipVerify = enabled
Expand Down

0 comments on commit 6fe9f00

Please sign in to comment.