It may be a regression caused by this recent change:
---
commit 61d478c71c5341cdc54e6bfb4ace4252852fd972
Author: Christian Heimes <christian@python.org>
Date: Sat Jan 27 15:51:38 2018 +0100
bpo-31399: Let OpenSSL verify hostname and IP address (#3462)
bpo-31399: Let OpenSSL verify hostname and IP
The ssl module now uses OpenSSL's X509_VERIFY_PARAM_set1_host() and
X509_VERIFY_PARAM_set1_ip() API to verify hostname and IP addresses.
* Remove match_hostname calls
* Check for libssl with set1_host, libssl must provide X509_VERIFY_PARAM_set1_host()
* Add documentation for OpenSSL 1.0.2 requirement
* Don't support OpenSSL special mode with a leading dot, e.g. ".example.org" matches "www.example.org". It's not standard conform.
* Add hostname_checks_common_name
Signed-off-by: Christian Heimes <christian@python.org>
---
Travis CI output, reformatted to make it more readable:
https://travis-ci.org/python/cpython/jobs/334652437
test_check_hostname (test.test_ftplib.TestTLS_FTPClass) ...
Exception in thread Thread-83:
Traceback (most recent call last):
File "/home/travis/build/python/cpython/Lib/asynchat.py", line 251, in initiate_send
num_sent = self.send(data)
File "/home/travis/build/python/cpython/Lib/test/test_ftplib.py", line 381, in send
return super(SSLConnection, self).send(data)
File "/home/travis/build/python/cpython/Lib/asyncore.py", line 360, in send
result = self.socket.send(data)
File "/home/travis/build/python/cpython/Lib/ssl.py", line 963, in send
return self._sslobj.write(data)
File "/home/travis/build/python/cpython/Lib/ssl.py", line 670, in write
return self._sslobj.write(data)
ssl.SSLError: [SSL: SSLV3_ALERT_BAD_CERTIFICATE] sslv3 alert bad certificate (_ssl.c:2206)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/travis/build/python/cpython/Lib/asyncore.py", line 83, in read
obj.handle_read_event()
File "/home/travis/build/python/cpython/Lib/test/test_ftplib.py", line 369, in handle_read_event
super(SSLConnection, self).handle_read_event()
File "/home/travis/build/python/cpython/Lib/asyncore.py", line 422, in handle_read_event
self.handle_read()
File "/home/travis/build/python/cpython/Lib/asynchat.py", line 171, in handle_read
self.found_terminator()
File "/home/travis/build/python/cpython/Lib/test/test_ftplib.py", line 116, in found_terminator
method(arg)
File "/home/travis/build/python/cpython/Lib/test/test_ftplib.py", line 231, in cmd_list
self.dtp.push(LIST_DATA)
File "/home/travis/build/python/cpython/Lib/test/test_ftplib.py", line 73, in push
super(DummyDTPHandler, self).push(what.encode('ascii'))
File "/home/travis/build/python/cpython/Lib/asynchat.py", line 202, in push
self.initiate_send()
File "/home/travis/build/python/cpython/Lib/asynchat.py", line 253, in initiate_send
self.handle_error()
File "/home/travis/build/python/cpython/Lib/test/test_ftplib.py", line 402, in handle_error
raise Exception
Exception
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/travis/build/python/cpython/Lib/threading.py", line 917, in _bootstrap_inner
self.run()
File "/home/travis/build/python/cpython/Lib/test/test_ftplib.py", line 279, in run
asyncore.loop(timeout=0.1, count=1)
File "/home/travis/build/python/cpython/Lib/asyncore.py", line 207, in loop
poll_fun(timeout, map)
File "/home/travis/build/python/cpython/Lib/asyncore.py", line 150, in poll
read(obj)
File "/home/travis/build/python/cpython/Lib/asyncore.py", line 87, in read
obj.handle_error()
File "/home/travis/build/python/cpython/Lib/test/test_ftplib.py", line 402, in handle_error
raise Exception
Exception
ERROR
======================================================================
ERROR: test_check_hostname (test.test_ftplib.TestTLS_FTPClass)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/python/cpython/Lib/test/test_ftplib.py", line 958, in test_check_hostname
self.client.quit()
File "/home/travis/build/python/cpython/Lib/ftplib.py", line 665, in quit
resp = self.voidcmd('QUIT')
File "/home/travis/build/python/cpython/Lib/ftplib.py", line 278, in voidcmd
return self.voidresp()
File "/home/travis/build/python/cpython/Lib/ftplib.py", line 251, in voidresp
resp = self.getresp()
File "/home/travis/build/python/cpython/Lib/ftplib.py", line 236, in getresp
resp = self.getmultiline()
File "/home/travis/build/python/cpython/Lib/ftplib.py", line 222, in getmultiline
line = self.getline()
File "/home/travis/build/python/cpython/Lib/ftplib.py", line 204, in getline
line = self.file.readline(self.maxline + 1)
File "/home/travis/build/python/cpython/Lib/socket.py", line 582, in readinto
return self._sock.recv_into(b)
socket.timeout: timed out
|