mitmproxy/test
Maximilian Hils 5af9df326a fix certificate verification
This commit fixes netlib's optional (turned off by default)
certificate verification, which previously did not validate the
cert's host name. As it turns out, verifying the connection's host
name on an intercepting proxy is not really straightforward - if
we receive a connection in transparent mode without SNI, we have no
clue which hosts the client intends to connect to. There are two
basic approaches to solve this problem:

 1. Exactly mirror the host names presented by the server in the
    spoofed certificate presented to the client.
 2. Require the client to send the TLS Server Name Indication
    extension. While this does not work with older clients,
    we can validate the hostname on the proxy.

Approach 1 is problematic in mitmproxy's use case, as we may want
to deliberately divert connections without the client's knowledge.
As a consequence, we opt for approach 2. While mitmproxy does now
require a SNI value to be sent by the client if certificate
verification is turned on, we retain our ability to present
certificates to the client which are accepted with a maximum
likelihood.
2015-11-01 18:15:30 +01:00
..
data adjust test certificate generation 2015-11-01 17:48:34 +01:00
http fix tests 2015-09-28 14:04:25 +02:00
websockets refactor request model 2015-09-26 00:39:04 +02:00
__init__.py http2: add protocol tests 2015-06-05 20:19:48 +02:00
test_certutils.py python3++ 2015-09-20 19:40:09 +02:00
test_encoding.py python 3++ 2015-09-21 00:44:17 +02:00
test_imports.py cleanup code with autoflake 2015-05-27 11:25:33 +02:00
test_odict.py make tests compatible with py.test 2015-09-20 19:56:57 +02:00
test_socks.py python3++ 2015-09-20 19:56:45 +02:00
test_tcp.py fix certificate verification 2015-11-01 18:15:30 +01:00
test_utils.py refactor request model 2015-09-26 00:39:04 +02:00
test_version_check.py wip 2015-09-15 19:12:15 +02:00
test_wsgi.py python 3++ 2015-09-21 00:44:17 +02:00
tservers.py make tests compatible with py.test 2015-09-20 19:56:57 +02:00