Skip to content

Commit a8d7d32

Browse files
authored
Remove mozilla ca submodule and subsume this functionality (#19850)
<!-- Merging Requirements: - Please give your PR a title that is release-note friendly - In order to be merged, you must add the most appropriate category Label (Added, Changed, Fixed) to your PR --> <!-- Explain why this is an improvement (Does this add missing functionality, improve performance, or reduce complexity?) --> ### Purpose: <!-- Does this PR introduce a breaking change? --> ### Current Behavior: ### New Behavior: <!-- As we aim for complete code coverage, please include details regarding unit, and regression tests --> ### Testing Notes: <!-- Attach any visual examples, or supporting evidence (attach any .gif/video/console output below) -->
1 parent d5e91a3 commit a8d7d32

File tree

10 files changed

+3496
-52
lines changed

10 files changed

+3496
-52
lines changed

.github/workflows/mozilla-ca-cert.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Update Mozilla cert.pem Nightly
2+
3+
on:
4+
schedule:
5+
- cron: "0 11 * * *"
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
concurrency:
13+
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
update_cert:
18+
name: Update Mozilla cert.pem Nightly
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Download latest Mozilla CA cert.pem
25+
run: |
26+
curl --silent --show-error --location https://curl.se/ca/cacert.pem -o chia/ssl/cacert.pem
27+
28+
- name: Set up commit signing
29+
uses: Chia-Network/actions/commit-sign/gpg@main
30+
with:
31+
gpg_private_key: ${{ secrets.CHIA_AUTOMATION_PRIVATE_GPG_KEY }}
32+
passphrase: ${{ secrets.CHIA_AUTOMATION_PRIVATE_GPG_PASSPHRASE }}
33+
34+
- name: Create Pull Request if cacert.pem changed
35+
uses: peter-evans/create-pull-request@v6
36+
with:
37+
commit-message: "Update cacert.pem from Mozilla CA bundle"
38+
title: "Update cacert.pem from Mozilla CA bundle"
39+
body: "Automated update of cacert.pem from https://curl.se/ca/cacert.pem."
40+
branch: update-cacert-pem
41+
add-paths: chia/ssl/cacert.pem

.gitmodules

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,3 @@
22
path = chia-blockchain-gui
33
url = https://github.com/Chia-Network/chia-blockchain-gui.git
44
branch = main
5-
[submodule "mozilla-ca"]
6-
path = mozilla-ca
7-
url = https://github.com/Chia-Network/mozilla-ca.git
8-
branch = main

Install.ps1

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ if ($null -eq (Get-Command git -ErrorAction SilentlyContinue))
3737
Exit 1
3838
}
3939

40-
git submodule update --init mozilla-ca
41-
4240
if ($null -eq (Get-Command py -ErrorAction SilentlyContinue))
4341
{
4442
Write-Output "Unable to find py"

build_scripts/pyinstaller.spec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ datas.append((f"{ROOT}/chia/util/initial-config.yaml", "chia/util"))
123123
for path in sorted({path.parent for path in ROOT.joinpath("chia").rglob("*.hex")}):
124124
datas.append((f"{path}/*.hex", path.relative_to(ROOT)))
125125
datas.append((f"{ROOT}/chia/ssl/*", "chia/ssl"))
126-
datas.append((f"{ROOT}/mozilla-ca/*", "mozilla-ca"))
127126
datas.extend(version_data)
128127

129128
pathex = []

chia/ssl/cacert.pem

Lines changed: 3453 additions & 0 deletions
Large diffs are not rendered by default.

chia/ssl/create_ssl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def get_chia_ca_crt_key() -> tuple[Any, Any]:
3636

3737

3838
def get_mozilla_ca_crt() -> str:
39-
mozilla_path = Path(__file__).parent.parent.parent.absolute() / "mozilla-ca/cacert.pem"
39+
mozilla_path = Path(__file__).parent.absolute() / "cacert.pem"
4040
return str(mozilla_path)
4141

4242

install.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ if [ "$(uname -m)" = "armv7l" ]; then
5757
echo "Exiting."
5858
exit 1
5959
fi
60-
# Get submodules
61-
git submodule update --init mozilla-ca
6260

6361
# You can specify preferred python version by exporting `INSTALL_PYTHON_VERSION`
6462
# e.g. `export INSTALL_PYTHON_VERSION=3.9`

mozilla-ca

Lines changed: 0 additions & 1 deletion
This file was deleted.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ homepage = "https://chia.net/"
1313

1414
[tool.poetry]
1515
# see [tool.poetry-dynamic-versioning]
16-
packages = [{ include = "chia"}, { include = "mozilla-ca/cacert.pem" }]
16+
packages = [{ include = "chia"}]
1717
version = "0.0.0"
1818

1919
[project.scripts]

0 commit comments

Comments
 (0)