[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:44:50 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)
I guess one possible use for the name property would be the need for a human-readable string, for use in log messages (just like in the patch). Still, I guess that could be done as a class property instead (?)
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3539#discussion_r1931834186
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/3539/review/2577632024 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20250128/ad62724d/attachment-0001.htm>
More information about the Rpm-maint
mailing list