mirror of
https://github.com/django/django.git
synced 2024-12-01 15:42:04 +01:00
Fixed #34386 -- Made SMTP backend load default system root CA certificates by default.
Regression in 2848e5d0ce
.
This commit is contained in:
parent
b05dfc2894
commit
c914d6cff1
@ -57,10 +57,12 @@ class EmailBackend(BaseEmailBackend):
|
||||
|
||||
@cached_property
|
||||
def ssl_context(self):
|
||||
ssl_context = ssl.SSLContext(protocol=ssl.PROTOCOL_TLS_CLIENT)
|
||||
if self.ssl_certfile or self.ssl_keyfile:
|
||||
ssl_context = ssl.SSLContext(protocol=ssl.PROTOCOL_TLS_CLIENT)
|
||||
ssl_context.load_cert_chain(self.ssl_certfile, self.ssl_keyfile)
|
||||
return ssl_context
|
||||
return ssl_context
|
||||
else:
|
||||
return ssl.create_default_context()
|
||||
|
||||
def open(self):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user