Displaying 1 result from an estimated 1 matches for "do_cryptsetup_reencrypt".
2016 Dec 02
0
[PATCH] New API: cryptsetup_reencrypt: change the master volume key on LUKS partitions.
...luks_available (void)
@@ -294,3 +295,48 @@ do_luks_kill_slot (const char *device, const char *key, int keyslot)
return 0;
}
+
+int
+optgroup_luksreencrypt_available (void)
+{
+ return prog_exists (str_cryptsetup_reencrypt);
+}
+
+/* Takes optional arguments, consult optargs_bitmask. */
+int
+do_cryptsetup_reencrypt (const char *device, const char *key, int keyslot,
+ const char *cipher)
+{
+ const char *argv[MAX_ARGS];
+ size_t i = 0;
+ char keyslot_s[16];
+
+ char *tempfile = write_key_to_temp (key);
+ if (!tempfile)
+ return -1;
+
+ ADD_ARG (argv, i, str_cryptsetup_reencrypt...