]> the.earth.li Git - onak.git/blobdiff - onak.c
Use a set of policy flags to indicate what key cleaning to perform
[onak.git] / onak.c
diff --git a/onak.c b/onak.c
index 89c2ec7ba04e5f779ef87c56863b1dd3d919b622..085a876c54c9dac6ceb1d4f22bbb8ec2fcff8f91 100644 (file)
--- a/onak.c
+++ b/onak.c
@@ -233,7 +233,7 @@ int main(int argc, char *argv[])
                        logthing(LOGTHING_INFO, "Finished reading %d keys.",
                                        result);
 
-                       result = cleankeys(keys);
+                       result = cleankeys(&keys, config.clean_policies);
                        logthing(LOGTHING_INFO, "%d keys cleaned.",
                                        result);
 
@@ -288,7 +288,8 @@ int main(int argc, char *argv[])
                                        result);
 
                        if (keys != NULL) {
-                               result = cleankeys(keys);
+                               result = cleankeys(&keys,
+                                               config.clean_policies);
                                logthing(LOGTHING_INFO, "%d keys cleaned.",
                                                result);
 
@@ -436,7 +437,7 @@ int main(int argc, char *argv[])
                        dbctx->starttrans(dbctx);
                        if (dbctx->fetch_key_id(dbctx, keyid, &keys, true)) {
                                dbctx->delete_key(dbctx, keyid, true);
-                               cleankeys(keys);
+                               cleankeys(&keys, config.clean_policies);
                                dbctx->store_key(dbctx, keys, true, false);
                        } else {
                                puts("Key not found");