[Rpm-maint] [rpm-software-management/rpm] Check not configured keystore backends for keys (PR #3539)

Michal Domonkos notifications at github.com
Tue Jan 28 09:39:54 UTC 2025


@dmnks commented on this pull request.



> @@ -96,6 +96,27 @@ static rpmRC write_key_to_disk(rpmPubkey key, string & dir, string & filename, i
     return rc;
 }
 
+rpmRC rpm::check_backends(rpmtxn txn, rpmts ts)
+{
+    rpmRC rc = RPMRC_OK;
+
+    keystore_fs ks_fs = {};
+    keystore_rpmdb ks_rpmdb = {};
+    keystore_openpgp_cert_d ks_opengpg = {};
+
+    for (keystore *ks : std::vector<keystore*> {&ks_fs, &ks_rpmdb, &ks_opengpg}) {
+	if (ks->name == ts->keystore->name)

IOW, why do we need the custom `name` property at all? Or is there some other use for it besides this use case?

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

Message ID: <rpm-software-management/rpm/pull/3539/review/2577619571 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20250128/a4b441e8/attachment.htm>


More information about the Rpm-maint mailing list