Skip to content

Commit c11001d

Browse files
committed
Upgrade SSL params for roundup-server
Params were still using md5, a key size of 768 and allowed SSL 2 and 3. Now using sha512, key size of 2048 and TLS 1.1 or newer. This still doesn't fix the use of SSL in roundup-server. It has problems under both 2.7 and 3.x. Tickets in tracker opened for both,
1 parent b446e89 commit c11001d

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

CHANGES.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ Fixed:
110110
is used in some template to provide a select box of timezones. It
111111
uses cgi.escape that is depricated and removed from 3.8 and newer.
112112
Use html.escape with fallback to cgi.escape. (Cedric Krier)
113+
- roundup-server can act as an SSL server. Usually SSL is provided by
114+
a front-end server like nginx, hiawtha, apache. The SSL parameters
115+
have been upgraded to TLS 1.1. Cert is RSA 2048 bytes with SHA512
116+
signature. Without these upgrades, ssl mode won't start. Note this
117+
exposes other issue with roundup-server operating as an SSL
118+
endpoint. See issue2551138 and issue2551137.
113119

114120
Features:
115121
- issue2550522 - Add 'filter' command to command-line

roundup/scripts/roundup_server.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def auto_ssl():
109109
print(_('WARNING: generating temporary SSL certificate'))
110110
import OpenSSL, random
111111
pkey = OpenSSL.crypto.PKey()
112-
pkey.generate_key(OpenSSL.crypto.TYPE_RSA, 768)
112+
pkey.generate_key(OpenSSL.crypto.TYPE_RSA, 2048)
113113
cert = OpenSSL.crypto.X509()
114114
cert.set_serial_number(random.randint(0, sys.maxsize))
115115
cert.gmtime_adj_notBefore(0)
@@ -119,8 +119,8 @@ def auto_ssl():
119119
cert.get_issuer().CN = 'Roundup Dummy Certificate Authority'
120120
cert.get_issuer().O = 'Self-Signed'
121121
cert.set_pubkey(pkey)
122-
cert.sign(pkey, 'md5')
123-
ctx = SSL.Context(SSL.SSLv23_METHOD)
122+
cert.sign(pkey, 'sha512')
123+
ctx = SSL.Context(OpenSSL.SSL.TLSv1_1_METHOD)
124124
ctx.use_privatekey(pkey)
125125
ctx.use_certificate(cert)
126126

@@ -133,7 +133,7 @@ def __init__(self, server_address, HandlerClass, ssl_pem=None):
133133
http_.server.HTTPServer.__init__(self, server_address, HandlerClass)
134134
self.socket = socket.socket(self.address_family, self.socket_type)
135135
if ssl_pem:
136-
ctx = SSL.Context(SSL.SSLv23_METHOD)
136+
ctx = SSL.Context(SSL.TLSv1_1_METHOD)
137137
ctx.use_privatekey_file(ssl_pem)
138138
ctx.use_certificate_file(ssl_pem)
139139
else:

0 commit comments

Comments
 (0)