bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-wget] HTTPS Python tests fail if localhost resolves to ::1


From: Tomas Hozza
Subject: [Bug-wget] HTTPS Python tests fail if localhost resolves to ::1
Date: Fri, 2 Jun 2017 11:38:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

Hi.

In Fedora 26+ the /etc/hosts lists "localhost" as a domain for both 127.0.0.1 
and ::1. This makes wget's testsuite to fail during build.

Failing tests:
Test--https.py
Test-pinnedpubkey-der-https.py
Test-pinnedpubkey-hash-https.py
Test-pinnedpubkey-pem-https.py


address@hidden sources]# cat testenv/Test--https.log 
Python runtime initialized with LC_CTYPE=C (a locale with default ASCII 
encoding), which may cause Unicode compatibility problems. Using C.UTF-8, 
C.utf8, or UTF-8 (if available) as alternative Unicode-compatible locales is 
recommended.
Setting --no-config (noconfig) to 1
Setting --ca-certificate (cacertificate) to /sources/testenv/certs/ca-cert.pem
DEBUG output created by Wget 1.19.1.68-5d4ad on linux-gnu.

Reading HSTS entries from /sources/testenv/Test--https.py-test/.wget-hsts
URI encoding = 'ANSI_X3.4-1968'
converted 'https://127.0.0.1:41111/File1' (ANSI_X3.4-1968) -> 
'https://127.0.0.1:41111/File1' (UTF-8)
Converted file name 'File1' (UTF-8) -> 'File1' (ANSI_X3.4-1968)
--2017-06-02 09:28:34--  https://127.0.0.1:41111/File1
Loaded CA certificate '/sources/testenv/certs/ca-cert.pem'
Certificates loaded: 1
Connecting to 127.0.0.1:41111... connected.
Created socket 3.
Releasing 0x00000000024ee050 (new refcount 0).
Deleting unused 0x00000000024ee050.
The certificate's owner does not match hostname '127.0.0.1'
URI encoding = 'ANSI_X3.4-1968'
converted 'https://127.0.0.1:41111/File2' (ANSI_X3.4-1968) -> 
'https://127.0.0.1:41111/File2' (UTF-8)
Converted file name 'File2' (UTF-8) -> 'File2' (ANSI_X3.4-1968)
--2017-06-02 09:28:34--  https://127.0.0.1:41111/File2
Connecting to 127.0.0.1:41111... connected.
Created socket 3.
Releasing 0x000000000278f1d0 (new refcount 0).
Deleting unused 0x000000000278f1d0.
The certificate's owner does not match hostname '127.0.0.1'
Running Test Test--https.py
/sources/src/wget --debug --no-config 
--ca-certificate=/sources/testenv/certs/ca-cert.pem 
https://127.0.0.1:41111/File1 https://127.0.0.1:41111/File2 
['/sources/src/wget', '--debug', '--no-config', 
'--ca-certificate=/sources/testenv/certs/ca-cert.pem', 
'https://127.0.0.1:41111/File1', 'https://127.0.0.1:41111/File2']
Error: Expected file File1 not found..
Traceback (most recent call last):
  File "./Test--https.py", line 53, in <module>
    protocols=Servers
  File "/sources/testenv/test/http_test.py", line 41, in begin
    self.do_test()
  File "/sources/testenv/test/base_test.py", line 187, in do_test
    self.post_hook_call()
  File "/sources/testenv/test/base_test.py", line 206, in post_hook_call
    self.hook_call(self.post_configs, 'Post Test Function')
  File "/sources/testenv/test/base_test.py", line 196, in hook_call
    conf.find_conf(conf_name)(conf_arg)(self)
  File "/sources/testenv/conf/expected_files.py", line 54, in __call__
    raise TestFailed('Expected file %s not found.' % file.name)
exc.test_failed.TestFailed: Expected file File1 not found.
FAIL Test--https.py (exit status: 1)

I didn't have time to investigate this thoroughly yet, but I thought I'll let 
you know in case the issue will be obvious to anyone. I suspect that there will 
be a mismatch between the address on which the HTTPS server runs and the data 
in the certificate it uses.

Regards,
Tomas
-- 
Tomas Hozza
Associate Manager, Software Engineering - EMEA ENG Mainstream RHEL

PGP: 1D9F3C2D
UTC+2 (CEST)
Red Hat Inc.                 http://cz.redhat.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]