diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1a76721..55f78fb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,7 +42,7 @@ jobs: python-version: "3.12" - name: Install dependencies - run: pip install pyinstaller click pyyaml + run: pip install pyinstaller click pyyaml certifi - name: Build binary run: pyinstaller --onefile --name mdcms mdcms.py diff --git a/mdcms.py b/mdcms.py index 5c94e51..0a72de2 100644 --- a/mdcms.py +++ b/mdcms.py @@ -10,10 +10,13 @@ import json import os import re +import ssl import urllib.error import urllib.request from pathlib import Path +import certifi + import click import yaml @@ -434,7 +437,8 @@ def _github_get(url: str) -> bytes: "Accept": "application/vnd.github.v3+json", }, ) - with urllib.request.urlopen(req, timeout=15) as resp: + ctx = ssl.create_default_context(cafile=certifi.where()) + with urllib.request.urlopen(req, timeout=15, context=ctx) as resp: return resp.read() diff --git a/pyproject.toml b/pyproject.toml index b042193..be4eb92 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,6 +13,7 @@ requires-python = ">=3.9" dependencies = [ "click>=8.0", "PyYAML>=6.0", + "certifi>=2024.0", ] [project.scripts]