diff options
author | Maximilian Hils <git@maximilianhils.com> | 2013-11-19 05:03:10 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2013-11-19 05:03:10 +0100 |
commit | 643602c066cdeac8653c28cf0c23f98a1c0ad7fe (patch) | |
tree | a8c7d93bc13f71de08c60958cbe79f921324263f /netlib/tcp.py | |
parent | 5e4ccbd7edc6eebf9eee25fd4d6ca64994ed6522 (diff) | |
parent | 28a0030c1ecacb8ac5c6e6453b6a22bdf94d9f7e (diff) | |
download | mitmproxy-643602c066cdeac8653c28cf0c23f98a1c0ad7fe.tar.gz mitmproxy-643602c066cdeac8653c28cf0c23f98a1c0ad7fe.tar.bz2 mitmproxy-643602c066cdeac8653c28cf0c23f98a1c0ad7fe.zip |
Merge branch 'fix_windows_bugs' into fix_invalid_tcp_close
Diffstat (limited to 'netlib/tcp.py')
-rw-r--r-- | netlib/tcp.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/netlib/tcp.py b/netlib/tcp.py index 31e9a398..f4a713f9 100644 --- a/netlib/tcp.py +++ b/netlib/tcp.py @@ -235,6 +235,7 @@ class TCPClient: try: if self.ssl_established: self.connection.shutdown() + self.connection.sock_shutdown(socket.SHUT_WR) else: self.connection.shutdown(socket.SHUT_WR) #Section 4.2.2.13 of RFC 1122 tells us that a close() with any pending readable data could lead to an immediate RST being sent. @@ -302,6 +303,8 @@ class BaseHandler: if request_client_cert: def ver(*args): self.clientcert = certutils.SSLCert(args[1]) + # err 20 = X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY + #return True ctx.set_verify(SSL.VERIFY_PEER, ver) self.connection = SSL.Connection(ctx, self.connection) self.ssl_established = True @@ -338,6 +341,7 @@ class BaseHandler: try: if self.ssl_established: self.connection.shutdown() + self.connection.sock_shutdown(socket.SHUT_WR) else: self.connection.shutdown(socket.SHUT_WR) #Section 4.2.2.13 of RFC 1122 tells us that a close() with any pending readable data could lead to an immediate RST being sent. |