vinix-ports / ca-certificates / make-config.py
9 lines · 8 sloc · 472 bytes · a33ddf23ff7658e6bd33d91c6837d2993ef68787
Raw
1"""Write update-ca-certificates' default trust selections from the matching Vinix bundle."""
2from pathlib import Path
3import os
4
5certs = Path(os.environ["VPAC_MAKEPKG_ROOT"]) / "usr/share/ca-certificates"
6files = sorted(path.relative_to(certs).as_posix() for path in (certs / "mozilla").glob("*.crt"))
7if "mozilla/ISRG_Root_X1.crt" not in files:
8 raise SystemExit("missing packaged Mozilla authorities")
9Path("ca-certificates.conf").write_text("\n".join(files) + "\n")
10