🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #5069

Bug#1154446: ca-certificates: drop stale CRTs on rebuild

#5069
From: Alexey Immoreev
Date: Thu, 19 Nov 2026 10:00
75 lines
4015 bytes
--===============8317183609264631861==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit

Source: ca-certificates
Version: 20260816+nmu1
Severity: normal
Tags: patch

Hello,

Rebuilding the Mozilla certificate set in an existing ca-certificates
source tree can retain certificates removed from the input set.
certdata2pem.py leaves old CRTs in place and writes a _2 variant when
the normal filename already exists.

To reproduce in a disposable extraction of the 20260816+nmu1 source:

  make -C mozilla all
  printf '\n"ISRG Root X1"\n' >> mozilla/blacklist.txt
  make -C mozilla all

The test-only blacklist edit simulates removing one root. Expected: 119
CRT files, with ISRG_Root_X1.crt gone. Observed: 238 CRTs (up from 120),
with ISRG_Root_X1.crt still present. With the attached patch, the repeated
build produced exactly the same 119 filenames and SHA-256 hashes as a
clean build with the changed blacklist. Tested the Debian source with
Python 3.14.4 and cryptography 46.0.5; no system trust store was modified.

The patch only clears generated outputs in mozilla/ before invoking the
converter. It does not change the source trust policy or installation.
The OpenWrt PR also addresses its separate private staging directory;
that downstream change is not part of this patch:
https://github.com/openwrt/openwrt/pull/26790

Bug discovery was LLM-assisted. A human reviewed the patch and
authorized its submission.

Thanks,
Alexey

--===============8317183609264631861==
Content-Type: text/x-patch; charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="mozilla-remove-stale-generated-certificates.patch"
MIME-Version: 1.0

From 99277872bdc1495453458493affed7111307c825 Mon Sep 17 00:00:00 2001
From: Alexey Immoreev <github@luixo.me>
Date: Wed, 18 Nov 2026 18:48:12 +0000
Subject: [PATCH] mozilla: remove stale generated certificates before
 conversion

certdata2pem.py does not remove obsolete files and creates a _2 variant
when a certificate output name already exists. Clear previous generated
output before invoking the converter.

Signed-off-by: Alexey Immoreev <github@luixo.me>
---
 mozilla/Makefile | 1 +
 1 file changed, 1 insertion(+)

--- a/mozilla/Makefile
+++ b/mozilla/Makefile
@@ -3,6 +3,7 @@
 #
 
 all:
+	rm -f -- *.crt
 	python3 certdata2pem.py
 
 clean:

--===============8317183609264631861==--
Technical Details
Message-ID: <O175T-cRLQ-5@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!fu-berlin.de!news.servidellagleba.it!bofh.it!news.nic.it!robomod

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!fu-berlin.de!news.servidellagleba.it!bofh.it!news.nic.it!robomod
From: Alexey Immoreev <github@luixo.me>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1154446: ca-certificates: drop stale CRTs on rebuild
Date: Thu, 19 Nov 2026 11:00:01 +0100
Message-ID: <O175T-cRLQ-5@gated-at.bofh.it>
X-Original-To: submit@bugs.debian.org
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Thu Nov 19 09:51:09 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.651
Reply-To: Alexey Immoreev <github@luixo.me>, 1154446@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: jcristau@debian.org
X-Debian-Pr-Message: report 1154446
X-Debian-Pr-Package: src:ca-certificates
X-Debian-Pr-Keywords: patch
X-Debian-Pr-Source: ca-certificates
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============8317183609264631861=="
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2003505
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 75
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Thu, 19 Nov 2026 09:48:21 +0000
X-Original-Message-ID: 
 <179508170117.2229769.1641899493669773775.ca-certificates-rebuild@luixo.me>