mitmproxy/netlib
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
..
http Merge branch 'http-models' 2015-09-28 13:53:59 +02:00
websockets minor fixes 2015-09-25 18:24:18 +02:00
__init__.py minor cleanups 2014-08-16 15:53:07 +02:00
certutils.py fix certificate verification 2015-11-01 18:15:30 +01:00
encoding.py improve request tests, coverage++ 2015-09-26 20:07:11 +02:00
exceptions.py http1: add assemble_body function 2015-09-17 02:39:42 +02:00
odict.py python3++ 2015-09-17 16:31:50 +02:00
socks.py python3++ 2015-09-20 19:40:09 +02:00
tcp.py fix certificate verification 2015-11-01 18:15:30 +01:00
tutils.py refactor response model 2015-09-26 17:39:50 +02:00
utils.py Merge branch 'http-models' 2015-09-28 13:53:59 +02:00
version_check.py wip 2015-09-15 19:12:15 +02:00
version.py Bump netlib version - 0.13.1 is already out 2015-08-17 10:21:30 +12:00
wsgi.py refactor response model 2015-09-26 17:39:50 +02:00