Package: python-gevent
Version: 1.0.1-1
Severity: important
Dear Maintainer,
I got the following message during start of a application:
$ ./drop_server.py
Traceback (most recent call last):
File "./drop_server.py", line 233, in <module>
main()
File "./drop_server.py", line 216, in main
from gevent import pywsgi
File "/usr/lib/python2.7/dist-packages/gevent/pywsgi.py", line 12, in
<module>
from gevent import socket
File "/usr/lib/python2.7/dist-packages/gevent/socket.py", line 659, in
<module>
from gevent.ssl import sslwrap_simple as ssl, SSLError as sslerror,
SSLSocket as SSLType
File "/usr/lib/python2.7/dist-packages/gevent/ssl.py", line 385, in <module>
def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv3,
ca_certs=None):
NameError: name 'PROTOCOL_SSLv3' is not defined
The line in the application are the following:
--snip--
def main():
from gevent import pywsgi
# change the bind as needed and maybe enable TLS
server = pywsgi.WSGIServer(('127.0.0.1', 6000),
app,
# keyfile='server.key',
# certfile='server.crt'
)
print('Serving on http://127.0.0.1:6000')
# to start the server asynchronously, use its start() method;
# we use blocking serve_forever() here because we have no other jobs
server.serve_forever()
if __name__ == '__main__':
main()
This quick fix help:
--- ../ssl.py 2014-11-20 07:37:45.038683239 +0100
+++ /usr/lib/python2.7/dist-packages/gevent/ssl.py 2014-11-20
07:41:21.164175844 +0100
@@ -382,7 +382,7 @@ def wrap_socket(sock, keyfile=None, cert
ciphers=ciphers)
-def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None):
+def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv23, ca_certs=None):
"""Retrieve the certificate from the server at the specified address,
and return it as a PEM-encoded string.
If 'ca_certs' is specified, validate the server cert against it.
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (700, 'unstable'), (650, 'testing'), (600, 'stable'), (500,
'testing-updates'), (500, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.17-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages python-gevent depends on:
ii libc6 2.19-13
ii python 2.7.8-2
ii python-greenlet 0.4.5-1
python-gevent recommends no packages.
Versions of packages python-gevent suggests:
pn python-gevent-dbg <none>
pn python-gevent-doc <none>
pn python-openssl <none>
-- no debconf information
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]