]> the.earth.li Git - onak.git/blobdiff - keydb_stacked.c
Change delete_key to use a full fingerprint
[onak.git] / keydb_stacked.c
index 699552bc9c1828c6ae4989c6c73f803a8d5f0a38..c715c63172d2449cacaea01882785cb7936016d4 100644 (file)
@@ -13,8 +13,7 @@
  * more details.
  *
  * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * this program.  If not, see <https://www.gnu.org/licenses/>.
  */
 
 #include <stdbool.h>
@@ -72,7 +71,8 @@ static int stacked_store_key(struct onak_dbctx *dbctx,
                        publickey, intrans, update);
 }
 
-static int stacked_delete_key(struct onak_dbctx *dbctx, uint64_t keyid,
+static int stacked_delete_key(struct onak_dbctx *dbctx,
+               struct openpgp_fingerprint *fp,
                bool intrans)
 {
        struct onak_stacked_dbctx *privctx =
@@ -81,7 +81,7 @@ static int stacked_delete_key(struct onak_dbctx *dbctx, uint64_t keyid,
                        (struct onak_dbctx *) privctx->backends->object;
 
        return backend->delete_key(backend,
-                       keyid, intrans);
+                       fp, intrans);
 }
 
 static int stacked_update_keys(struct onak_dbctx *dbctx,
@@ -114,7 +114,7 @@ static void store_on_fallback(struct onak_stacked_dbctx *privctx,
                        (struct onak_dbctx *) privctx->backends->object;
        struct openpgp_publickey *curkey;
 
-       cleankeys(publickey);
+       cleankeys(&publickey, config.clean_policies);
        /*
         * If we walked the stack at all, store the key in the first
         * backend if configured to do so. It's not an update as we