von / PerProxy

A python-based proxy that uses Perspectives to detect and thwart SSL MITM attacks.
7 stars 2 forks source link

Query of Notary needs a timeout #7

Closed von closed 13 years ago

von commented 13 years ago

Current it will just hang if Notary does not respond.

Querying Notary at cmu.ron.lcs.mit.edu port 8080 about encrypted.google.com:443,2...

What's a reasonable default timeout? 1 second?

von commented 13 years ago

Actually the current asyncore loop will eventually time out, but it seems to take about a minute:

Error: uncaptured python exception, closing channel <Perspectives.HTTP_dispatcher.HTTP_dispatcher at 0x13153c8> (<class 'socket.error'>:[Errno 60] Operation timed out [/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/asyncore.py|read|79] [/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/asyncore.py|handle_read_event|435] [/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/asyncore.py|handle_connect_event|443])

Unfortunately, passing timeout to asyncore.loop() doesn't seem to effect connect timeout.

von commented 13 years ago

This has been fixed in underlying pyPerspectives library - see https://github.com/von/pyPerspectives/issues/2