From 31cda851985140a3b6108fb51f1ef7f7f4aac9cd Mon Sep 17 00:00:00 2001 From: Jonathan McDowell Date: Wed, 8 Jun 2016 23:24:05 +0100 Subject: [PATCH] Clean keys before storing them in the stacked backend If we fetch keys from a lower level of the stacked backends then run the clean functions before trying to store them in the top level. --- keydb_stacked.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keydb_stacked.c b/keydb_stacked.c index c732720..fdbccf3 100644 --- a/keydb_stacked.c +++ b/keydb_stacked.c @@ -20,6 +20,7 @@ #include #include +#include "cleankey.h" #include "decodekey.h" #include "hash.h" #include "keydb.h" @@ -117,6 +118,7 @@ static void store_on_fallback(struct onak_stacked_dbctx *privctx, (struct onak_dbctx *) privctx->backends->object; struct openpgp_publickey *curkey; + cleankeys(publickey); /* * 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 -- 2.39.5