Skip to content

Commit

Permalink
Merge pull request #1612 from SpecLad/unhardcode-sslv3
Browse files Browse the repository at this point in the history
Don't hardcode TLS version to SSLv3
  • Loading branch information
Mikhail Sobolev committed Mar 27, 2015
2 parents 05ada3b + 9b7dc8d commit e3d65f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
16 changes: 1 addition & 15 deletions master/buildbot/status/mail.py
Expand Up @@ -36,13 +36,6 @@
except ImportError:
ESMTPSenderFactory = None

have_ssl = True
try:
from twisted.internet import ssl
from OpenSSL.SSL import SSLv3_METHOD
except ImportError:
have_ssl = False

# this incantation teaches email to output utf-8 using 7- or 8-bit encoding,
# although it has no effect before python-2.7.
from email import charset
Expand Down Expand Up @@ -816,12 +809,6 @@ def _gotRecipients(self, rlist, m):
def sendmail(self, s, recipients):
result = defer.Deferred()

if have_ssl and self.useTls:
client_factory = ssl.ClientContextFactory()
client_factory.method = SSLv3_METHOD
else:
client_factory = None

if self.smtpUser and self.smtpPassword:
useAuth = True
else:
Expand All @@ -833,8 +820,7 @@ def sendmail(self, s, recipients):
sender_factory = ESMTPSenderFactory(
self.smtpUser, self.smtpPassword,
self.fromaddr, recipients, StringIO(s),
result, contextFactory=client_factory,
requireTransportSecurity=self.useTls,
result, requireTransportSecurity=self.useTls,
requireAuthentication=useAuth)

reactor.connectTCP(self.relayhost, self.smtpPort, sender_factory)
Expand Down
2 changes: 2 additions & 0 deletions master/docs/relnotes/index.rst
Expand Up @@ -85,6 +85,8 @@ Features

* Builders can now have multiple "tags" associated with them. Tags can be used in various status classes as filters (eg, on the waterfall page).

* :bb:status:`MailNotifier` no longer forces SSL 3.0 when ``useTls`` is true.

Fixes
~~~~~

Expand Down

0 comments on commit e3d65f1

Please sign in to comment.