Only test bundled CA certs on macOS

This commit is contained in:
Kovid Goyal
2021-08-16 22:26:10 +05:30
parent a2e25331a5
commit aa525c68c7
3 changed files with 11 additions and 5 deletions

View File

@@ -30,6 +30,7 @@ def initialize_constants():
kitty_constants['appname'] = re.search(
r'appname: str\s+=\s+(u{0,1})[\'"]([^\'"]+)[\'"]', src
).group(2)
kitty_constants['cacerts_url'] = 'https://curl.haxx.se/ca/cacert.pem'
return kitty_constants

View File

@@ -185,8 +185,7 @@ class Freeze(object):
def add_ca_certs(self):
print('\nDownloading CA certs...')
from urllib.request import urlopen
ca_certs_url = 'https://curl.haxx.se/ca/cacert.pem'
certs = urlopen(ca_certs_url).read()
certs = urlopen(kitty_constants['cacerts_url']).read()
dest = os.path.join(self.contents_dir, 'Resources', 'cacert.pem')
with open(dest, 'wb') as f:
f.write(certs)