diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2022-03-02 15:26:12 +0200 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2022-03-02 15:31:25 +0000 |
commit | 77839490bf79659682ed87b8a45752754a0d87df (patch) | |
tree | 33680a525f838c5f752eb7528cfba5fe483f2f6d | |
parent | 2e4d6b2bdf335149ff22da790c88a6bff2ece2db (diff) |
Disable certificate checking on RHEL/CentOS 7
They have too old CA certificates that don't work with the widely used
Let's Encrypt certificates.
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/820>
-rw-r--r-- | cerbero/build/source.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cerbero/build/source.py b/cerbero/build/source.py index aeeac2d8..1082ea10 100644 --- a/cerbero/build/source.py +++ b/cerbero/build/source.py @@ -25,7 +25,7 @@ import collections import asyncio from hashlib import sha256 -from cerbero.config import Platform, DEFAULT_MIRRORS +from cerbero.config import Distro, DistroVersion, Platform, DEFAULT_MIRRORS from cerbero.utils import git, svn, shell, _, run_until_complete from cerbero.errors import FatalError, CommandError, InvalidRecipeError import cerbero.utils.messages as m @@ -191,7 +191,11 @@ class BaseTarball(object): os.makedirs(self.download_dir) # Enable certificate checking only on Linux for now # FIXME: Add more platforms here after testing - cc = self.config.platform == Platform.LINUX + cc = False + if self.config.platform == Platform.LINUX: + if self.config.distro != Distro.REDHAT or \ + self.config.distro_version > DistroVersion.REDHAT_7: + cc = True await shell.download(self.url, fname, check_cert=cc, overwrite=redownload, logfile=get_logfile(self), mirrors= self.config.extra_mirrors + DEFAULT_MIRRORS) |