[Rpm-maint] [rpm-software-management/rpm] Implement openpgp.cert.d based keystore (PR #3437)
Florian Festi
notifications at github.com
Mon Nov 11 14:11:37 UTC 2024
@ffesti commented on this pull request.
> +rpmRC keystore_openpgp_cert_d::load_keys(rpmtxn txn, rpmKeyring keyring)
+{
+ return load_keys_from_glob(txn, keyring, "%{_keyringpath}/*/*");
+}
+
+rpmRC keystore_openpgp_cert_d::delete_key(rpmtxn txn, rpmPubkey key)
+{
+ rpmRC rc = RPMRC_NOTFOUND;
+
+ if (acquire_write_lock(txn) != RPMRC_OK)
+ return RPMRC_FAIL;
+
+ string fp = rpmPubkeyFingerprintAsHex(key);
+ string dir = fp.substr(0, 2);
+ string filename = fp.substr(2);
+ char * filepath = rpmGetPath(rpmtxnRootDir(txn), "%{_keyringpath}/", dir.c_str(), "/", filename.c_str(), NULL);
Well, rpmGenPath was originally used. But as it only supports 3 pieces I used rpmGetPath here.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3437#discussion_r1836731363
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/3437/review/2427389088 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20241111/be84521c/attachment.html>
More information about the Rpm-maint
mailing list