Skip to content

blink-qt: use cacert bundle instead of vendored CA bundle - #577808

Merged
imincik merged 1 commit into
NixOS:masterfrom
irgolic:cacert/blink-qt
Oct 23, 2026
Merged

imincik merged 1 commit into
NixOS:masterfrom
irgolic:cacert/blink-qt

Conversation

@irgolic

@irgolic irgolic commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Part of #576541.

Blink, blink-qt, has a bundled CA file, share/blink/tls/ca.crt. In Blink, the default value of TLSSettingsExtension.ca_list is this file. python3-sipsimple gives this file to PJSIP for SIP with TLS, and to GnuTLS for MSRP with TLS. This change replaces the file with a symlink to the ca-bundle.crt file of cacert in postFixup. The wheel in the dist output keeps the bundled file (#576542).

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. On the master branch, blink-qt does not build. Three of its Python dependencies have problems that are not related to this change: msrplib, xcaplib and python3-sipsimple. Thus, the harness builds the package after this change with the test overlay fixes/unbreak-msrplib.nix, and it cannot build the package before this change. Start the command in a local copy of nix-cacert-harness, because the overlay is a file in this repository.

nix run github:irgolic/nix-cacert-harness -- blink-qt --pr 577808 --emudhra --after-overlay fixes/unbreak-msrplib.nix
Harness output: blink-qt
$ nix run github:irgolic/nix-cacert-harness -- blink-qt --base 8915027df75d0403ef013dd0cbf09ff3c602fd03 --after github:irgolic/nixpkgs/99b54fc4ce941ded0d42d73495de1f7a46a5a31f --emudhra --after-overlay fixes/unbreak-msrplib.nix
[1/2] static check + eMudhra chains: offline, reproducible
base (before) = 8915027df75d0403ef013dd0cbf09ff3c602fd03
reference: fprs4zi8r6227x12qbsd1grvfrpz6201-nss-cacert-3.131.1 TLS roots=118 all=169
==================================================================
ATTR blink-qt
before: 8915027df75d0403ef013dd0cbf09ff3c602fd03   after: github:irgolic/nixpkgs/99b54fc4ce941ded0d42d73495de1f7a46a5a31f + overlay unbreak-msrplib.nix
before BUILD FAILED (log: /home/rafael/.cache/nix-cacert-harness/blink-qt/static/before/build.log)
        drv /nix/store/…-blink-qt-6.0.6.drv
after  ok (1 built, 33s)
        drv /nix/store/…-blink-qt-6.0.6.drv

| output:path | before | after |
|---|---|---|
| out:/share/blink/tls/ca.crt | n/a | symlink->cacert:ca-bundle.crt pem 169 certs (118 TLS roots + 51 non-TLS, i.e. cacert's own trust-rules bundle) |

inside archives (scanner only; a symlink in the installed output cannot reach them, issue #576542 class):
  after  dist:/blink-6.0.6-cp314-cp314-linux_x86_64.whl!blink-6.0.6.data/data/share/blink/tls/ca.crt  roots=125 trusts AAA Certificate Services,emSign ECC Root CA - C3,emSign ECC Root CA - G3,emSign Root CA - C1,emSign Root CA - G1

cacert in runtime closure (after): yes
VERDICT blink-qt: INCOMPLETE (a side was not built) (+ bundles inside archives remain, see above)

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/blink/tls/ca.crt | n/a | symlink->cacert:ca-bundle.crt pem: accepted 0/14 |
inside archives (zip members, extracted):
| dist:/blink-6.0.6-cp314-cp314-linux_x86_64.whl!blink-6.0.6.data/data/share/blink/tls/ca.crt | n/a | pem: accepted 14/14 (g3: 7/7, aaa: 7/7, noct: 2/2) |
VERDICT blink-qt emudhra: INCOMPLETE (a side was not built); after accepts 0/14 compromised eMudhra chains (+ after-side archive members accept 14/14 (g3: 7/7, aaa: 7/7, noct: 2/2), see table)

[2/2] live eMudhra test hosts: needs network, NOT reproducible offline
(no shims/blink-qt.{nix,sh} or shims/live/blink-qt.{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). The harness cannot build the package before this change, thus the result is INCOMPLETE. The wheel in the dist output keeps the bundled file, and this file accepts all 14 chains (accepted 14/14). Before this change, the installed file is the same file (SHA-256 0553831d…). Thus, it 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 installed file accepts no chain (accepted 0/14). The output has no second part, because Blink has only a GUI, and it makes TLS connections only to SIP servers and MSRP relays.

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
@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: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. llm-assisted Contributions that include code generation with LLMs labels Oct 23, 2026

@imincik imincik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great thanks for this fix.

@imincik
imincik added this pull request to the merge queue Oct 23, 2026
Merged via the queue into NixOS:master with commit 9dae12b Oct 23, 2026
34 checks passed
@phanirithvij phanirithvij added 6.topic: NLNet / NGI The project is part of the NGI funding grant. https://nlnet.nl/NGI/ backport release-26.05 Backport PR automatically and removed 6.topic: NLNet / NGI The project is part of the NGI funding grant. https://nlnet.nl/NGI/ labels Oct 23, 2026
@phanirithvij phanirithvij added this to NGI Oct 23, 2026
@github-project-automation github-project-automation Bot moved this to Needs Refinement in NGI Oct 23, 2026
@phanirithvij phanirithvij moved this from Needs Refinement to Done in NGI Oct 23, 2026
@nixpkgs-ci

nixpkgs-ci Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Successfully created backport PR for release-26.05:

@github-actions github-actions Bot added the 8.has: port to stable This PR already has a backport to the stable release. label Oct 23, 2026

@dotlambda dotlambda left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a good fix: certificates should be read from the system rather than from a package.

@eljamm

eljamm commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

This isn't a good fix: certificates should be read from the system rather than from a package.

This was suggested by the tracking issue:

Fix: Replace the file with a symlink to ${cacert}/etc/ssl/certs/ca-bundle.crt, or point the program at it.

If you think reading the system-wide certs would be better, I suggest you mention it there so more people are aware of this and proper discussion can happen.

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 8.has: port to stable This PR already has a backport to the stable release. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. backport release-26.05 Backport PR automatically llm-assisted Contributions that include code generation with LLMs

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants