Skip to content

Instantly share code, notes, and snippets.

@pusateri
Created May 18, 2015 04:26
Show Gist options
  • Save pusateri/3cba128f8ff0edd3dcb1 to your computer and use it in GitHub Desktop.
Save pusateri/3cba128f8ff0edd3dcb1 to your computer and use it in GitHub Desktop.
libchromiumcontent script/update SSL patch
diff --git a/script/update b/script/update
index 93028c5..df751d2 100755
--- a/script/update
+++ b/script/update
@@ -9,6 +9,7 @@ import subprocess
import tarfile
import tempfile
import urllib2
+import ssl
from lib.util import get_output_dir
@@ -69,8 +70,9 @@ def download_source_tarball(version):
tar_name = dir_name + '.tar'
xz_name = tar_name + '.xz'
url = TARBALL_URL.format(TARBALL_REPO, version)
+ gcontext = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
with open(xz_name, 'wb+') as t:
- with contextlib.closing(urllib2.urlopen(url)) as u:
+ with contextlib.closing(urllib2.urlopen(url,context=gcontext)) as u:
while True:
chunk = u.read(1024*1024)
if not len(chunk):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment