Skip to content

Commit

Permalink
Get SSL certificates with PROTOCOL_SSLv23 for maximum compatibility
Browse files Browse the repository at this point in the history
	Note: Python > 2.7.6 uses PROTOCOL_SSLv23 by default but there are some
	Linux distributions out there which still use older versions. This patch
	mainly addresses such distributions.
  • Loading branch information
buffer committed Jun 9, 2015
1 parent 173656d commit 423f827
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DOM/HTTPSession.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def fetch_ssl_certificate(self, url):
return

port = _url.port if _url.port else 443
certificate = ssl.get_server_certificate((_url.netloc, port))
certificate = ssl.get_server_certificate((_url.netloc, port), ssl_version = ssl.PROTOCOL_SSLv23)
log.ThugLogging.log_certificate(url, certificate)

def fetch(self, url, method = "GET", window = None, personality = None, headers = {}, body = None):
Expand Down

0 comments on commit 423f827

Please sign in to comment.