Add the ability to store encryption keys in the Linux keyring
facility.
For that, factor out common parts from secret to a new abstract class
secret_common, and introduce new user-creatable secret_keyring class
inheriting from it.
Use '--enable-keyring/--disable-keyring' configuration parameters
to provide this feature.
Example:
$QEMU -object secret_keyring,id=sec0,serial=0x15968230
v4 changes:
- removed all extra white space aligment;
- removed last NULL parameter from 'object_class_property_add_*' functions;
- removed the word "support" from configure output summary.
- removed the 'linux/keyctl.h' include from configure keyutils test;
- temporary added 'g_test_skip()' at start of the metod
'test_secret_keyring_bad_key_access_right()'.
Alexey Krasikov (3):
crypto/secret: move main logic from 'secret' to 'secret_common'.
crypto/linux_keyring: add 'secret_keyring' secret object.
test-crypto-secret: add 'secret_keyring' object tests.
configure | 62 +++++
crypto/Makefile.objs | 2 +
crypto/secret.c | 347 +--------------------------
crypto/secret_common.c | 403 ++++++++++++++++++++++++++++++++
crypto/secret_keyring.c | 148 ++++++++++++
include/crypto/secret.h | 20 +-
include/crypto/secret_common.h | 68 ++++++
include/crypto/secret_keyring.h | 52 +++++
tests/Makefile.include | 4 +
tests/test-crypto-secret.c | 158 +++++++++++++
10 files changed, 907 insertions(+), 357 deletions(-)
create mode 100644 crypto/secret_common.c
create mode 100644 crypto/secret_keyring.c
create mode 100644 include/crypto/secret_common.h
create mode 100644 include/crypto/secret_keyring.h
--
2.17.1