Skip to content

Instantly share code, notes, and snippets.

@dpnova
Last active August 29, 2015 14:13
Show Gist options
  • Save dpnova/d009f5fe52088db896c7 to your computer and use it in GitHub Desktop.
Save dpnova/d009f5fe52088db896c7 to your computer and use it in GitHub Desktop.
"""
This is a hack to stop verification which seems to block.
This shouldn't ever make it to prod!!!
"""
from logging import getLogger
from OpenSSL.SSL import Connection
Connection.set_tlsext_host_name = lambda s, n: None
getLogger(__name__).warning(
"Currently we are vulnerable to MITM attacks: "
"https://twistedmatrix.com/trac/ticket/7552"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment