Ticket #2555: no-sslv3.diff

File no-sslv3.diff, 612 bytes (added by jor, 10 years ago)

Patch to use TLSv12

  • deluge/core/rpcserver.py

    diff --git a/deluge/core/rpcserver.py b/deluge/core/rpcserver.py
    index 649c2ce..65601df 100644
    a b def getContext(self):  
    131131        SSL transport.
    132132        """
    133133        ssl_dir = deluge.configmanager.get_config_dir("ssl")
    134         ctx = SSL.Context(SSL.SSLv3_METHOD)
     134        ctx = SSL.Context(SSL.SSLv23_METHOD)
     135        ctx.set_options(SSL.OP_NO_SSLv2 & SSL.OP_NO_SSLv3)
    135136        ctx.use_certificate_file(os.path.join(ssl_dir, "daemon.cert"))
    136137        ctx.use_privatekey_file(os.path.join(ssl_dir, "daemon.pkey"))
    137138        return ctx