Skip to content

gpac: use cacert bundle instead of vendored CA bundle - #577803

Merged
r-vdp merged 1 commit into
NixOS:masterfrom
irgolic:cacert/gpac
Oct 25, 2026
Merged

r-vdp merged 1 commit into
NixOS:masterfrom
irgolic:cacert/gpac

Conversation

@irgolic

@irgolic irgolic commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Part of #576541.

GPAC has a bundled CA file, share/gpac/res/ca-bundle.crt. The default gpac package does not read this file. It does not use OpenSSL or libcurl, thus it cannot open https:// URLs. Only gpac.override { withFullDeps = true; } reads the file, and only when no -ca-bundle option is set and the default CA file of OpenSSL or libcurl is not available. This change replaces the file with a symlink to the ca-bundle.crt file of cacert in postInstall. Thus, the change corrects the fallback for that configuration.

Warning

AI Disclosure: Claude Code made the code change, the commit message and the first version of this pull request description. Claude Code used Claude Fable 5.1 and Claude Opus 5.5. I examined all of this work. Claude Code also wrote all of nix-cacert-harness. This pull request description is written in ASD-STE100 (Simplified Technical English), examined with memelint in strict mode.

Test

nix-cacert-harness examines the package before and after this change. A local copy of nixpkgs is not necessary. The harness builds GPAC from source after this change, and this build is approximately 2 minutes long.

nix run github:irgolic/nix-cacert-harness -- gpac --pr 577803 --emudhra
Harness output: gpac
$ nix run github:irgolic/nix-cacert-harness -- gpac --base 8915027df75d0403ef013dd0cbf09ff3c602fd03 --after github:irgolic/nixpkgs/13307d8861cdf3f4db441c3afffeb3080e84b1ef --emudhra --force-build
[1/2] static check + eMudhra chains: offline, reproducible
base (before) = 8915027df75d0403ef013dd0cbf09ff3c602fd03
reference: fprs4zi8r6227x12qbsd1grvfrpz6201-nss-cacert-3.131.1 TLS roots=118 all=169
==================================================================
ATTR gpac
before: 8915027df75d0403ef013dd0cbf09ff3c602fd03   after: github:irgolic/nixpkgs/13307d8861cdf3f4db441c3afffeb3080e84b1ef
before ok (0 built, 1s)
        drv /nix/store/…-gpac-26.07.0.drv
after  ok (1 built, 130s)
        drv /nix/store/…-gpac-26.07.0.drv

| output:path | before | after |
|---|---|---|
| out:/share/gpac/res/ca-bundle.crt | pem 147 certs: 26 not in cacert, 18 in cacert but not for TLS, 15 cacert TLS roots missing; scanner: AAA,ECC G3 | symlink->cacert:ca-bundle.crt pem 169 certs (118 TLS roots + 51 non-TLS, i.e. cacert's own trust-rules bundle) |

cacert in runtime closure (before): no
cacert in runtime closure (after): yes
CAs trusted before but not trusted for TLS by cacert (44 total), e.g.:
  - C=GB, O=Comodo CA Limited, CN=AAA Certificate Services
  - C=IN, OU=emSign PKI, O=eMudhra Technologies Limited, CN=emSign ECC Root CA - G3
  - C=US, OU=emSign PKI, O=eMudhra Inc, CN=emSign ECC Root CA - C3
  - C=US, OU=emSign PKI, O=eMudhra Inc, CN=emSign Root CA - C1
  - C=AT, O=e-commerce monitoring GmbH, CN=GLOBALTRUST 2020
  - C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
  - C=BM, O=QuoVadis Limited, CN=QuoVadis Root CA 2
  - C=BM, O=QuoVadis Limited, CN=QuoVadis Root CA 3
  - C=CH, O=SwissSign AG, CN=SwissSign Gold CA - G2
  - C=CH, O=SwissSign AG, CN=SwissSign Silver CA - G2
VERDICT gpac: FIXED: before trusted CAs outside cacert; after: 1 store(s) == cacert, none with extra CAs

eMudhra chains (--emudhra; offline and reproducible): the 14 chains in fixtures/emudhra,
each leaf verified against each store (openssl verify -purpose sslserver, at 2026-10-23):
| output:path | before | after |
|---|---|---|
| out:/share/gpac/res/ca-bundle.crt | pem: accepted 14/14 (g3: 7/7, aaa: 7/7, noct: 2/2) | symlink->cacert:ca-bundle.crt pem: accepted 0/14 |
VERDICT gpac emudhra: FIXED: before accepted 14/14 compromised eMudhra chains (g3: 7/7, aaa: 7/7, noct: 2/2); after 0/14

[2/2] live eMudhra test hosts: needs network, NOT reproducible offline
(no shims/gpac.{nix,sh} or shims/live/gpac.{nix,sh}: live check skipped)

The harness tests the package with the certificate chains of the eMudhra incident, from https://emudhra.we-have-a-problem.com/ (only the certificates, not the keys). Before this change, the bundled file accepts all 14 chains (accepted 14/14). Thus, the file accepts the eMudhra intermediate certificates through emSign ECC Root CA - G3 and through the Sectigo cross-sign by AAA Certificate Services. After this change, the file accepts no chain (accepted 0/14). The output has no second part, because the default gpac package cannot make TLS connections. nixpkgs has no package for the withFullDeps = true configuration, thus the harness cannot test it.

Things done

Assisted-by: Claude Code (Claude Fable 5.1)
Assisted-by: Claude Code (Claude Opus 5.5)
@irgolic irgolic added the 1.severity: security Issues which raise a security issue, or PRs that fix one label Oct 23, 2026
@zimbatm zimbatm mentioned this pull request Oct 23, 2026
66 of 95 tasks
@nixpkgs-ci
nixpkgs-ci Bot requested review from mgdelacroix and thesn10 October 23, 2026 11:43
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. llm-assisted Contributions that include code generation with LLMs labels Oct 23, 2026
@nixpkgs-review-gha

Copy link
Copy Markdown

❌ nixpkgs-review result

Generated using nixpkgs-review-gha (710407f)

Command: nixpkgs-review pr 577803
Commit: 13307d8861cdf3f4db441c3afffeb3080e84b1ef (subsequent changes)
Merge: 650e25ae55c625323f915529f57606bc0515bf58

Triggered by @thesn10 (38666407)
Logs: https://github.com/thesn10/nixpkgs-review-gha/actions/runs/40103238551/attempts/1


x86_64-linux

❌ 4 packages failed to build:
  • dash-mpd-cli
  • tdarr-node
  • tdarr-server
  • tdarr
✅ 3 packages built:
  • gpac
  • gpac-unstable
  • ccextractor

aarch64-linux

❌ 4 packages failed to build:
  • dash-mpd-cli
  • tdarr-server
  • tdarr-node
  • tdarr
✅ 3 packages built:
  • gpac
  • gpac-unstable
  • ccextractor

x86_64-darwin

✅ No rebuilds


aarch64-darwin (sandbox = relaxed)

❌ 3 packages failed to build:
  • tdarr
  • tdarr-node
  • tdarr-server
✅ 4 packages built:
  • ccextractor
  • dash-mpd-cli
  • gpac
  • gpac-unstable

@thesn10

thesn10 commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

The failures of dash-mpd-cli and tdarr were already there before this PR: shaka-packager fails with gcc 16 (NixOS/nixpkgs#571536), and handbrake builds ffmpeg-full with a patch that no longer applies (NixOS/nixpkgs#576333, fix in NixOS/nixpkgs#576407). Neither failure is related to this PR.

Approved.

@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Oct 24, 2026
@r-vdp
r-vdp added this pull request to the merge queue Oct 25, 2026
Merged via the queue into NixOS:master with commit 810a0b4 Oct 25, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.severity: security Issues which raise a security issue, or PRs that fix one 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. llm-assisted Contributions that include code generation with LLMs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants