mbox series

[v3,0/3] Add secret_keyring object

Message ID 20200518202804.3761-1-alex-krasikov@yandex-team.ru
Headers show
Series Add secret_keyring object | expand

Message

Alexey Krasikov May 18, 2020, 8:28 p.m. UTC
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

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                       |  63 +++++
 crypto/Makefile.objs            |   2 +
 crypto/secret.c                 | 351 +--------------------------
 crypto/secret_common.c          | 405 ++++++++++++++++++++++++++++++++
 crypto/secret_keyring.c         | 141 +++++++++++
 include/crypto/secret.h         |  20 +-
 include/crypto/secret_common.h  |  68 ++++++
 include/crypto/secret_keyring.h |  45 ++++
 tests/Makefile.include          |   4 +
 tests/test-crypto-secret.c      | 154 ++++++++++++
 10 files changed, 892 insertions(+), 361 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