[Rpm-maint] [rpm-software-management/rpm] Reflect pgpPubKeyLint() error code in rpmtxnImportPubkey() return (PR #4100)

Panu Matilainen notifications at github.com
Tue Feb 3 08:59:33 UTC 2026


@pmatilai commented on this pull request.



> +    if (Fread(buf, 1, blen, fd) != blen) {
+	fprintf(stderr, "failed to read %s: %m\n", fn);
+	goto exit;
+    }
+
+    if (pgpParsePkts((char *)buf, &pkt, &pktlen) != PGPARMOR_PUBKEY) {
+	fprintf(stderr, "failed to parse key\n");
+	goto exit;
+    }
+
+    pkti = pkt;
+    while (pktlen > 0) {
+	if (pgpPubKeyCertLen(pkti, pktlen, &certlen))
+	    break;
+
+	rc = rpmtsImportPubkey(ts, pkti, certlen);

Oh, indeed. I had a version that printed the results per key, and since this goes to the trouble of handling multiple keys elsewhere, it should handle that here too. Good spotting.

(we're not in any hurry here because we can't *really* test this until the related change in rpm-sequoia lands)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/4100#discussion_r2757985702
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/4100/review/3743958341 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20260203/e3035994/attachment-0001.htm>


More information about the Rpm-maint mailing list