Commit Graph

138 Commits

Author SHA1 Message Date
Thomas Kriechbaumer
836b1eab97 fix warnings and code smells
use prospector to find them
2015-06-17 13:10:27 +02:00
Aldo Cortesi
bb206323ab Merge pull request #69 from kyle-m/master
Adding support for upstream certificate validation when using SSL/TLS…
2015-06-16 10:34:09 +12:00
Kyle Morton
fe764cde52 Adding support for upstream certificate validation when using SSL/TLS with an
instance of TCPClient.
2015-06-15 10:18:54 -07:00
Thomas Kriechbaumer
0d137eac6f simplify ALPN 2015-06-14 19:50:35 +02:00
Thomas Kriechbaumer
9c6d237d02 add new TLS methods 2015-06-14 18:17:53 +02:00
Thomas Kriechbaumer
5fab755a05 add more tests 2015-06-12 15:27:29 +02:00
Thomas Kriechbaumer
eeaed93a83 improve ALPN integration 2015-06-11 15:37:17 +02:00
Thomas Kriechbaumer
0595585974 fix coding style 2015-06-08 17:00:03 +02:00
Thomas Kriechbaumer
fdbb3b76cf http2: add warning if raw data looks like HTTP/1 2015-06-08 16:54:19 +02:00
Thomas Kriechbaumer
abbe88c8ce fix non-ALPN supported OpenSSL-related tests 2015-06-08 13:25:42 +02:00
Thomas Kriechbaumer
4666d1e7bb improve ALPN support on travis 2015-06-08 12:52:06 +02:00
Aldo Cortesi
2d9b9be1f4 Revert "tcp: clear_log to clear socket logs"
start_log also clears the log, which is good enough.

This reverts commit 4ca62e0d9b.
2015-06-05 11:50:29 +12:00
Aldo Cortesi
4ca62e0d9b tcp: clear_log to clear socket logs 2015-06-05 11:42:06 +12:00
Aldo Cortesi
f7bd690e3a When we see an incomplete read with 0 bytes, it's a disconnect
Partially fixes mitmproxy/mitmproxy:#593
2015-05-31 17:18:55 +12:00
Aldo Cortesi
73376e605a Save first byte timestamp for writers too. 2015-05-31 16:54:14 +12:00
Aldo Cortesi
f76bfabc5d Adjust pep8 parameters, reformat 2015-05-30 12:02:58 +12:00
Thomas Kriechbaumer
780836b182 add ALPN support to TCP abstraction 2015-05-29 15:31:22 +02:00
Thomas Kriechbaumer
161bc2cfaa cleanup code with autoflake
run the following command:
  $ autoflake -r -i --remove-all-unused-imports --remove-unused-variables .
2015-05-27 11:25:33 +02:00
Thomas Kriechbaumer
e3d390e036 cleanup code with autopep8
run the following command:
  $ autopep8 -i -r -a -a .
2015-05-27 11:19:11 +02:00
Thomas Kriechbaumer
d6a68e1394 remove outdated workarounds 2015-05-27 10:23:43 +02:00
Maximilian Hils
46fadfc823 improve displaying tcp addresses 2015-05-18 17:16:42 +02:00
Aldo Cortesi
f2bc58cdd2 Add tcp.Reader.safe_read, use it in socks and websockets
safe_read is guaranteed to raise or return a byte string of the
requested length. It's particularly useful for implementing binary
protocols.
2015-05-05 10:47:02 +12:00
Maximilian Hils
0c2ad1edb1 fix socket_close on Windows, refs mitmproxy/mitmproxy#527 2015-04-17 16:29:09 +02:00
Maximilian Hils
e58f76aec1 fix code smell 2015-04-09 02:09:33 +02:00
Maximilian Hils
7f7ccd3a18 100% test coverage 2015-04-09 00:57:37 +02:00
Maximilian Hils
6fbe3006af fail gracefully if we cannot start a new thread 2015-04-09 00:13:01 +02:00
Maximilian Hils
d5eff70b6e fix tests on Windows 2015-03-07 01:31:31 +01:00
Maximilian Hils
dbadc1b613 clean up cert handling, fix mitmproxy/mitmproxy#472 2015-03-07 01:22:02 +01:00
Maximilian Hils
da1eb94ccd 100% test coverage 🎉 2015-02-27 22:02:52 +01:00
Maximilian Hils
224f737646 add option to log ssl keys
refs mitmproxy/mitmproxy#475
2015-02-27 16:59:29 +01:00
Maximilian Hils
438c1fbc7d TCPClient: Use TLS1.1+ where available, BaseHandler: disable SSLv2 2014-12-15 12:32:36 +01:00
Aldo Cortesi
c56e7a90d8 Fix tracebacks in connection finish 2014-11-15 12:31:13 +13:00
Aldo Cortesi
0811a9ebde .flush can raise NetlibDisconnect. This fixes a traceback found in fuzzing. 2014-11-07 16:01:41 +13:00
Maximilian Hils
ed5e685565 refactor tcp close, fix mitmproxy/mitmproxy#376 2014-10-22 17:54:20 +02:00
Maximilian Hils
29a4e91050 fix mitmproxy/mitmproxy#375 2014-10-17 18:48:30 +02:00
Maximilian Hils
e6a8730f98 fix tcp closing for ssled connections 2014-10-09 04:42:39 +02:00
Maximilian Hils
fdb6f5552d CertStore: add support for cert chains 2014-10-08 20:46:30 +02:00
Maximilian Hils
274688172d fix mitmproxy/mitmproxy#373 2014-10-08 18:40:46 +02:00
Maximilian Hils
e73a2dbab1 minor changes 2014-09-28 03:15:26 +02:00
Aldo Cortesi
b21df0cf44 Merge branch 'master' of ssh.github.com:cortesi/netlib 2014-09-09 10:10:10 +12:00
Aldo Cortesi
63c1efd394 Remove avoidable imports from OpenSSL
Fixes #38
2014-09-09 10:08:56 +12:00
Maximilian Hils
f90ea89e69 more verbose errors 2014-09-08 18:38:05 +02:00
Aldo Cortesi
f98989b075 Merge branch 'master' into mitmproxy_issue_341
Conflicts:
	netlib/tcp.py
2014-09-07 12:39:59 +12:00
Aldo Cortesi
3b81d678c4 Use print function after future import 2014-09-07 11:24:41 +12:00
Maximilian Hils
4bf7f3c0ff set source_address if not manually specified 2014-09-04 16:55:02 +02:00
Maximilian Hils
ec628bc37d fix tcp.Address inequality comparison 2014-09-04 01:10:44 +02:00
Maximilian Hils
3d489f3bb7 adapt netlib.wsgi to changes in mitmproxy/mitmproxy#341 2014-09-03 17:15:50 +02:00
Maximilian Hils
6d1b601ddf minor cleanups 2014-08-16 15:53:07 +02:00
kronick
197dae9183 Made attribute optional (as it is in pyOpenSSL)
See 0d7e8a1af2 -- It looks like this constant isn't set on some platforms (including Raspberry Pi's libssl)
2014-07-29 15:12:13 +02:00
Maximilian Hils
66ac56509f add support for ctx.load_verify_locations, refs mitmproxy/mitmproxy#174 2014-05-21 01:14:55 +02:00