Displaying 16 results from an estimated 16 matches for "key_store_import_key".
2019 Nov 12
4
[PATCH 1/2] options: Fixes and enhancements to --key parsing.
The first patch fixes a rather serious bug, the second patch allows
multiple --key parameters and default parameters.
There is a third patch to libguestfs which adds a test, coming up.
I did not yet review and fix the documentation. I think we need to
centralize it in one place because at the moment the same
documentation for --key is copy/pasted all over the tools.
Rich.
2019 Nov 12
0
[PATCH 1/2] options: Fix segfault when multiple --key parameters given.
...0005555555bdd6e in free_key_store ()
#6 0x0000555555589027 in main ()
(gdb) quit
---
options/keys.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/options/keys.c b/options/keys.c
index 7f68986..f783066 100644
--- a/options/keys.c
+++ b/options/keys.c
@@ -216,7 +216,8 @@ key_store_import_key (struct key_store *ks, const struct key_store_key *key)
}
assert (ks != NULL);
- new_keys = realloc (ks->keys, sizeof (*ks->keys) + 1);
+ new_keys = realloc (ks->keys,
+ (ks->nr_keys + 1) * sizeof (struct key_store_key));
if (!new_keys)
error (EXIT...
2019 Nov 29
0
[common PATCH 2/2] options: allow a UUID as identifier for --key
...const char *param);
-extern char **get_keys (struct key_store *ks, const char *device);
+extern char **get_keys (struct key_store *ks, const char *device, const char *uuid);
extern struct key_store *key_store_add_from_selector (struct key_store *ks, const char *selector);
extern struct key_store *key_store_import_key (struct key_store *ks, const struct key_store_key *key);
extern void free_key_store (struct key_store *ks);
--
2.21.0
2019 Nov 26
0
[PATCH common v2 2/3] options: Allow multiple --key parameters.
...ern char *read_key (const char *param);
-extern char *get_key (struct key_store *ks, const char *device);
+extern char **get_keys (struct key_store *ks, const char *device);
extern struct key_store *key_store_add_from_selector (struct key_store *ks, const char *selector);
extern struct key_store *key_store_import_key (struct key_store *ks, const struct key_store_key *key);
extern void free_key_store (struct key_store *ks);
--
2.23.0
2019 Nov 12
0
[PATCH 2/2] options: Allow multiple --key parameters and default keys.
...ern char *read_key (const char *param);
-extern char *get_key (struct key_store *ks, const char *device);
+extern char **get_keys (struct key_store *ks, const char *device);
extern struct key_store *key_store_add_from_selector (struct key_store *ks, const char *selector);
extern struct key_store *key_store_import_key (struct key_store *ks, const struct key_store_key *key);
extern void free_key_store (struct key_store *ks);
--
2.23.0
2020 Feb 13
1
[common PATCH v4 0/1] options: add '--blocksize' option for C-based tools
From: Nikolay Ivanets <stenavin@gmail.com>
v4 fixes issues found during code review:
- whitespace-change-only hunks are removed
- options are alphabetically orderred now
v3 is just a spelling correction spotted by Eric Blake
https://www.redhat.com/archives/libguestfs/2020-February/msg00111.html
In v2 I've moved '--blocksize' parameter description into the separate
file called
2020 Feb 12
0
[common PATCH v2 1/1] options: add '--blocksize' option for C-based tools
...ormat; /* format (NULL == autodetect) */
const char *orig_uri; /* original URI (for error messages etc.) */
+ int blocksize; /* blocksize (0 == default) */
} uri;
struct {
char *guest; /* guest name */
@@ -156,7 +158,7 @@ extern struct key_store *key_store_import_key (struct key_store *ks, const struc
extern void free_key_store (struct key_store *ks);
/* in options.c */
-extern void option_a (const char *arg, const char *format, struct drv **drvsp);
+extern void option_a (const char *arg, const char *format, int blocksize, struct drv **drvsp);
extern void...
2020 Feb 11
1
[common PATCH] options: add '--blocksize' option for C-based tools
...ormat; /* format (NULL == autodetect) */
const char *orig_uri; /* original URI (for error messages etc.) */
+ int blocksize; /* blocksize (0 == default) */
} uri;
struct {
char *guest; /* guest name */
@@ -156,7 +158,7 @@ extern struct key_store *key_store_import_key (struct key_store *ks, const struc
extern void free_key_store (struct key_store *ks);
/* in options.c */
-extern void option_a (const char *arg, const char *format, struct drv **drvsp);
+extern void option_a (const char *arg, const char *format, int blocksize, struct drv **drvsp);
extern void...
2018 Sep 19
0
[PATCH 2/2] Introduce a --key option in tools that accept keys
...+ key.file.name = strdup (String_val (Field (v, 0)));
+ if (!key.file.name)
+ caml_raise_out_of_memory ();
+ break;
+ default:
+ error (EXIT_FAILURE, 0,
+ "internal error: unhandled Tag_val (v) = %d",
+ Tag_val (v));
+ }
+
+ ks = key_store_import_key (ks, &key);
+
+ keysv = Field (keysv, 1);
+ }
+
+ inspect_do_decrypt (g, ks);
CAMLreturn (Val_unit);
}
diff --git a/common/mltools/tools_utils.ml b/common/mltools/tools_utils.ml
index 2b2d43db9..ad08d05eb 100644
--- a/common/mltools/tools_utils.ml
+++ b/common/mltools/tools_utils.ml...
2023 May 19
3
[libguestfs PATCH 0/3] test "/dev/mapper/VG-LV" with "--key"
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2168506
This small set covers the new /dev/mapper/VG-LV "--key" ID format in the
libguestfs LUKS-on-LVM inspection test.
Thanks,
Laszlo
Laszlo Ersek (3):
update common submodule
LUKS-on-LVM inspection test: rename VGs and LVs
LUKS-on-LVM inspection test: test /dev/mapper/VG-LV translation
common
2020 Feb 12
1
[common PATCH v3 0/1] options: add '--blocksize' option for C-based tools
From: Nikolay Ivanets <stenavin@gmail.com>
v3 is just a spelling correction spotted by Eric Blake
In v2 I've moved '--blocksize' parameter description into the separate
file called blocksize-option.pod so we can include it everywhere we need
similar to key-option.pod.
https://www.redhat.com/archives/libguestfs/2020-February/msg00099.html
v1 was here:
2023 May 19
3
[guestfs-tools PATCH 0/3] test "/dev/mapper/VG-LV" with "--key"
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2168506
This small set covers the new /dev/mapper/VG-LV "--key" ID format in the
LUKS-on-LVM virt-inspector test.
Thanks,
Laszlo
Laszlo Ersek (3):
update common submodule
inspector: rename VGs and LVs in LUKS-on-LVM test
inspector: test /dev/mapper/VG-LV translation in LUKS-on-LVM test
common
2019 Nov 29
8
[PATCH 0/1] Allow UUIDs for --key identifiers.
This combined patch series enables to decrypt LUKS devices on inspection
by allowing the UUID of the LUKS device with the --key syntax.
I opted for reusing the option instead of adding another one, as I think
that device names and UUIDs are different enough that can be properly
distinguished.
A test for this (patch #4) can be applied only when the patches for
common are applied, and the
2020 Feb 12
3
[common PATCH v2 0/1] options: add '--blocksize' option for C-based tools
From: Nikolay Ivanets <stenavin@gmail.com>
In v2 I've moved '--blocksize' parameter description into the separate
file called blocksize-option.pod so we can include it everywhere we need
similar to key-option.pod.
v1 was here:
https://www.redhat.com/archives/libguestfs/2020-February/msg00096.html
Nikolay Ivanets (1):
options: add '--blocksize' option for C-based
2018 Sep 19
5
[PATCH 0/2] RFC: --key option for tools
Hi,
the following series adds a --key option in the majority of tools: this
makes it possible to pass LUKS credentials programmatically, avoid the
need to manually input them, or unsafely pass them via stdin.
Thanks,
Pino Toscano (2):
mltools: create a cmdline_options struct
Introduce a --key option in tools that accept keys
builder/cmdline.ml | 2 +-
2019 Nov 26
6
[PATCH options v2 0/3] options: Allow multiple and default --key parameters.
v1:
https://www.redhat.com/archives/libguestfs/2019-November/msg00036.html