PLT-5904 (Server): Config flag for SMTP Cert Check. (#5857)
Этот коммит содержится в:
коммит произвёл
enahum
родитель
01aaccb340
Коммит
b489a5bb01
@@ -25,7 +25,7 @@ func connectToSMTPServer(config *model.Config) (net.Conn, *model.AppError) {
|
||||
|
||||
if config.EmailSettings.ConnectionSecurity == model.CONN_SECURITY_TLS {
|
||||
tlsconfig := &tls.Config{
|
||||
InsecureSkipVerify: true,
|
||||
InsecureSkipVerify: *config.EmailSettings.SkipServerCertificateVerification,
|
||||
ServerName: config.EmailSettings.SMTPServer,
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ func newSMTPClient(conn net.Conn, config *model.Config) (*smtp.Client, *model.Ap
|
||||
}
|
||||
} else if config.EmailSettings.ConnectionSecurity == model.CONN_SECURITY_STARTTLS {
|
||||
tlsconfig := &tls.Config{
|
||||
InsecureSkipVerify: true,
|
||||
InsecureSkipVerify: *config.EmailSettings.SkipServerCertificateVerification,
|
||||
ServerName: config.EmailSettings.SMTPServer,
|
||||
}
|
||||
c.StartTLS(tlsconfig)
|
||||
|
||||
Ссылка в новой задаче
Block a user