Browse Source

Switch CherryPy to use Python ssl instead of PyOpenSSL

pull/701/head
Safihre 9 years ago
parent
commit
21549ab842
  1. 7
      SABnzbd.py
  2. 2
      sabnzbd/newswrapper.py

7
SABnzbd.py

@ -688,6 +688,7 @@ def attach_server(host, port, cert=None, key=None, chain=None):
http_server = _cpwsgi_server.CPWSGIServer()
http_server.bind_addr = (host, port)
if cert and key:
http_server.ssl_provider = 'builtin'
http_server.ssl_certificate = cert
http_server.ssl_private_key = key
http_server.ssl_certificate_chain = chain
@ -1356,8 +1357,7 @@ def main():
import sabnzbd.utils.sslinfo
logging.info("SSL version %s", sabnzbd.utils.sslinfo.ssl_version())
logging.info("pyOpenSSL version %s", sabnzbd.utils.sslinfo.pyopenssl_version())
logging.info("SSL potentially supported protocols %s", str(sabnzbd.utils.sslinfo.ssl_potential()))
logging.info("SSL actually supported protocols %s", str(sabnzbd.utils.sslinfo.ssl_protocols()))
logging.info("SSL supported protocols %s", str(sabnzbd.utils.sslinfo.ssl_protocols_labels()))
cherrylogtoscreen = False
sabnzbd.WEBLOGFILE = None
@ -1417,7 +1417,8 @@ def main():
# Extra HTTPS port for secondary localhost
attach_server(hosts[1], cherryport, https_cert, https_key)
cherrypy.config.update({'server.ssl_certificate': https_cert,
cherrypy.config.update({'server.ssl_module': 'builtin',
'server.ssl_certificate': https_cert,
'server.ssl_private_key': https_key,
'server.ssl_certificate_chain': https_chain})
elif multilocal:

2
sabnzbd/newswrapper.py

@ -162,8 +162,6 @@ def con(sock, host, port, sslenabled, write_fds, nntp):
except ssl.SSLError, e:
nntp.error(e)
print sock.cipher()
print sock.version()
def probablyipv4(ip):

Loading…
Cancel
Save