Bug 1655948 - fix ssl context error on windows aarch64. r=aki
authorJoel Maher <jmaher@mozilla.com>
Thu, 30 Jul 2020 17:15:10 +0000
changeset 542647 783eaa27f1ec3d9650699e37b59bc5e1b245a0e5
parent 542646 4f7d32e546c2d5ad8646ff6555cec0ba78481eb8
child 542648 72dc63402e4c97c28e82aee8bd7a95dd72e96167
push id37653
push userbtara@mozilla.com
push dateThu, 30 Jul 2020 21:54:52 +0000
treeherdermozilla-central@c34351a5fd6c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaki
bugs1655948
milestone81.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1655948 - fix ssl context error on windows aarch64. r=aki fix ssl context error on windows aarch64 Differential Revision: https://phabricator.services.mozilla.com/D85440
testing/mozharness/mozharness/base/script.py
testing/mozharness/mozharness/mozilla/testing/testbase.py
--- a/testing/mozharness/mozharness/base/script.py
+++ b/testing/mozharness/mozharness/base/script.py
@@ -405,17 +405,17 @@ class ScriptMixin(PlatformMixin):
             urllib2.URLError: on errors
 
         .. urillib.request.urlopen:
         https://docs.python.org/2/library/urllib2.html#urllib2.urlopen
         """
         # http://bugs.python.org/issue13359 - urllib2 does not automatically quote the URL
         url_quoted = quote(url, safe='%/:=&?~#+!$,;\'@()*[]|')
         # windows certificates need to be refreshed (https://bugs.python.org/issue36011)
-        if self.platform_name() in ('win64',):
+        if self.platform_name() in ('win64',) and platform.architecture()[0] in ('x64',):
             if self.ssl_context is None:
                 self.ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS)
                 self.ssl_context.load_default_certs()
             return urlopen(url_quoted, context=self.ssl_context, **kwargs)
         else:
             return urlopen(url_quoted, **kwargs)
 
     def fetch_url_into_memory(self, url):
--- a/testing/mozharness/mozharness/mozilla/testing/testbase.py
+++ b/testing/mozharness/mozharness/mozilla/testing/testbase.py
@@ -263,17 +263,17 @@ class TestingMixin(VirtualenvMixin, Auto
             return urllib.request.build_opener(authhandler).open(url, **kwargs)
 
         # If we have the developer_run flag enabled then we will switch
         # URLs to the right place and enable http authentication
         if "developer_config.py" in self.config["config_files"]:
             return _urlopen_basic_auth(url, **kwargs)
         else:
             # windows certificates need to be refreshed (https://bugs.python.org/issue36011)
-            if self.platform_name() in ('win64',):
+            if self.platform_name() in ('win64',) and platform.architecture()[0] in ('x64',):
                 if self.ssl_context is None:
                     self.ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS)
                     self.ssl_context.load_default_certs()
                 return urllib.request.urlopen(url, context=self.ssl_context, **kwargs)
             else:
                 return urllib.request.urlopen(url, **kwargs)
 
     def _query_binary_version(self, regex, cmd):