mirror of
https://github.com/zotero/zotero.git
synced 2026-11-27 23:58:57 +00:00
Mozilla sends CRL updates via Remote Settings, which we don't use, so we continue to trust revoked CA and intermediate certificates, including the compromised eMudhra intermediates. Fetch the current list from Mozilla at build time and apply the changes to the list on the first run of each build. Updating to the latest 153 ESR will also remove the eMudhra roots, which will invalidate the intermediates as well, but that won't help Zotero 10, since 140 ESR is EOL, and most revoked intermediates are blocked only via OneCRL without a root removal.
24 lines
715 B
Bash
Executable file
24 lines
715 B
Bash
Executable file
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
# Replace Firefox's bundled OneCRL list with the current one from Remote Settings
|
|
#
|
|
# Usage: fetch_onecrl FILE
|
|
|
|
URL="https://firefox.settings.services.mozilla.com/v1/buckets/security-state/collections/onecrl/changeset?_expected=0"
|
|
|
|
file="$1"
|
|
tmp_file="$file.tmp"
|
|
|
|
curl -sSf --retry 3 "$URL" -o "$tmp_file"
|
|
python3 -c '
|
|
import json, sys
|
|
with open(sys.argv[1]) as f:
|
|
changeset = json.load(f)
|
|
if not changeset["changes"]:
|
|
raise Exception("OneCRL list is empty")
|
|
with open(sys.argv[2], "w") as f:
|
|
json.dump({"data": changeset["changes"], "timestamp": changeset["timestamp"]}, f)
|
|
print("Fetched {} OneCRL records".format(len(changeset["changes"])))
|
|
' "$tmp_file" "$file"
|
|
rm "$tmp_file"
|