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

Michal Domonkos notifications at github.com
Mon Feb 2 15:08:05 UTC 2026


@dmnks 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);

`rc` will only contain the latest certificate's import result, is that okay?

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

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


More information about the Rpm-maint mailing list