python-urllib3 ftbfs in cosmic
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-urllib3 (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
=======
_________________ TestConnection.
self = <test.test_
def test_match_
cert = {'subjectAltName': [('DNS', 'foo')]}
try:
with mock.patch(
> _match_
test/test_
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cert = {'subjectAltName': [('DNS', 'foo')]}, asserted_hostname = 'bar'
def _match_
try:
> match_hostname(
urllib3/
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cert = {'subjectAltName': [('DNS', 'foo')]}, hostname = 'bar'
def match_hostname(
"""Verify that *cert* (in decoded format as returned by
rules are followed.
The function matches IP addresses rather than dNSNames if hostname is a
valid ipaddress string. IPv4 addresses are supported on all platforms.
IPv6 addresses are supported on platforms with IPv6 support (AF_INET6
and inet_pton).
returns nothing.
"""
if not cert:
raise ValueError("empty or no certificate, match_hostname needs a "
try:
host_ip = _inet_paton(
except ValueError:
# Not an IP address (common case)
host_ip = None
dnsnames = []
san = cert.get(
for key, value in san:
if key == 'DNS':
if host_ip is None and _dnsname_
elif key == 'IP Address':
if host_ip is not None and _ipaddress_
if not dnsnames:
# The subject is only checked when there is no dNSName entry
# in subjectAltName
for sub in cert.get('subject', ()):
for key, value in sub:
if len(dnsnames) > 1:
raise CertificateErro
% (hostname, ', '.join(map(repr, dnsnames))))
elif len(dnsnames) == 1:
raise CertificateErro
> % (hostname, dnsnames[0]))
E ssl.SSLCertVeri
/usr/lib/
During handling of the above exception, another exception occurred:
self = <test.test_
def test_match_
cert = {'subjectAltName': [('DNS', 'foo')]}
try:
with mock.patch(
except CertificateError as e:
> assert str(e) == "hostname 'bar' doesn't match 'foo'"
E assert '("hostname \...ch \'foo\'",)' == "hostname 'bar...t match 'foo'"
E - ("hostname 'bar' doesn't match 'foo'",)
E ? -- ---
E + hostname 'bar' doesn't match 'foo'
test/test_
======== 1 failed, 545 passed, 51 skipped, 1 deselected in 7.44 seconds ========
/usr/lib/
import imp
/usr/lib/
collections.
/usr/lib/
elif isinstance( exprs, collections.
E: pybuild pybuild:338: test: plugin distutils failed with: exit code=1: cd /<<PKGBUILDDIR>
dh_auto_test: pybuild --test -i python{version} -p "3.7 3.6" returned exit code 13
make: *** [debian/rules:16: build] Error 25
Changed in python-urllib3 (Ubuntu): | |
importance: | Undecided → High |
tags: | added: ftbfs rls-cc-incoming |
This was fixed in (1.22-1ubuntu0. 18.10.1)