[WebUI] Modify SSL Context to allow >=TLSv1 protocol

* The TLSv1_METHOD is a fixed protocol version so this change will allow higher versions to be used where possible.
This commit is contained in:
Calum Lind 2014-11-20 15:11:42 +00:00
parent 3689eb508e
commit cb37198a9d
1 changed files with 2 additions and 1 deletions

View File

@ -542,7 +542,8 @@ class ServerContextFactory:
def getContext(self): # NOQA def getContext(self): # NOQA
"""Creates an SSL context.""" """Creates an SSL context."""
ctx = SSL.Context(SSL.TLSv1_METHOD) ctx = SSL.Context(SSL.SSLv23_METHOD)
ctx.set_options(SSL.OP_NO_SSLv2 | SSL.OP_NO_SSLv3)
deluge_web = component.get("DelugeWeb") deluge_web = component.get("DelugeWeb")
log.debug("Enabling SSL using:") log.debug("Enabling SSL using:")
log.debug("Pkey: %s", deluge_web.pkey) log.debug("Pkey: %s", deluge_web.pkey)