2015-09-02 09:57:27 +00:00
|
|
|
crypto-obj-y = init.o
|
|
|
|
crypto-obj-y += hash.o
|
2016-03-11 18:09:22 +00:00
|
|
|
crypto-obj-$(CONFIG_NETTLE) += hash-nettle.o
|
|
|
|
crypto-obj-$(if $(CONFIG_NETTLE),n,$(CONFIG_GCRYPT)) += hash-gcrypt.o
|
2016-07-05 10:45:42 +00:00
|
|
|
crypto-obj-$(if $(CONFIG_NETTLE),n,$(if $(CONFIG_GCRYPT),n,y)) += hash-glib.o
|
2016-12-13 10:42:56 +00:00
|
|
|
crypto-obj-y += hmac.o
|
|
|
|
crypto-obj-$(CONFIG_NETTLE) += hmac-nettle.o
|
|
|
|
crypto-obj-$(CONFIG_GCRYPT_HMAC) += hmac-gcrypt.o
|
|
|
|
crypto-obj-$(if $(CONFIG_NETTLE),n,$(if $(CONFIG_GCRYPT_HMAC),n,y)) += hmac-glib.o
|
2015-09-02 09:57:27 +00:00
|
|
|
crypto-obj-y += aes.o
|
|
|
|
crypto-obj-y += desrfb.o
|
|
|
|
crypto-obj-y += cipher.o
|
2017-07-14 18:04:05 +00:00
|
|
|
crypto-obj-$(CONFIG_AF_ALG) += afalg.o
|
2017-07-14 18:04:06 +00:00
|
|
|
crypto-obj-$(CONFIG_AF_ALG) += cipher-afalg.o
|
2017-07-14 18:04:07 +00:00
|
|
|
crypto-obj-$(CONFIG_AF_ALG) += hash-afalg.o
|
2015-03-13 17:39:26 +00:00
|
|
|
crypto-obj-y += tlscreds.o
|
crypto: introduce new module for TLS anonymous credentials
Introduce a QCryptoTLSCredsAnon class which is used to
manage anonymous TLS credentials. Use of this class is
generally discouraged since it does not offer strong
security, but it is required for backwards compatibility
with the current VNC server implementation.
Simple example CLI configuration:
$QEMU -object tls-creds-anon,id=tls0,endpoint=server
Example using pre-created diffie-hellman parameters
$QEMU -object tls-creds-anon,id=tls0,endpoint=server,\
dir=/path/to/creds/dir
The 'id' value in the -object args will be used to associate the
credentials with the network services. For example, when the VNC
server is later converted it would use
$QEMU -object tls-creds-anon,id=tls0,.... \
-vnc 127.0.0.1:1,tls-creds=tls0
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2015-03-13 17:39:26 +00:00
|
|
|
crypto-obj-y += tlscredsanon.o
|
crypto: Implement TLS Pre-Shared Keys (PSK).
Pre-Shared Keys (PSK) is a simpler mechanism for enabling TLS
connections than using certificates. It requires only a simple secret
key:
$ mkdir -m 0700 /tmp/keys
$ psktool -u rjones -p /tmp/keys/keys.psk
$ cat /tmp/keys/keys.psk
rjones:d543770c15ad93d76443fb56f501a31969235f47e999720ae8d2336f6a13fcbc
The key can be secretly shared between clients and servers. Clients
must specify the directory containing the "keys.psk" file and a
username (defaults to "qemu"). Servers must specify only the
directory.
Example NBD client:
$ qemu-img info \
--object tls-creds-psk,id=tls0,dir=/tmp/keys,username=rjones,endpoint=client \
--image-opts \
file.driver=nbd,file.host=localhost,file.port=10809,file.tls-creds=tls0,file.export=/
Example NBD server using qemu-nbd:
$ qemu-nbd -t -x / \
--object tls-creds-psk,id=tls0,endpoint=server,dir=/tmp/keys \
--tls-creds tls0 \
image.qcow2
Example NBD server using nbdkit:
$ nbdkit -n -e / -fv \
--tls=on --tls-psk=/tmp/keys/keys.psk \
file file=disk.img
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-07-03 08:03:03 +00:00
|
|
|
crypto-obj-y += tlscredspsk.o
|
2015-03-13 17:39:26 +00:00
|
|
|
crypto-obj-y += tlscredsx509.o
|
2015-03-02 17:23:31 +00:00
|
|
|
crypto-obj-y += tlssession.o
|
crypto: add QCryptoSecret object class for password/key handling
Introduce a new QCryptoSecret object class which will be used
for providing passwords and keys to other objects which need
sensitive credentials.
The new object can provide secret values directly as properties,
or indirectly via a file. The latter includes support for file
descriptor passing syntax on UNIX platforms. Ordinarily passing
secret values directly as properties is insecure, since they
are visible in process listings, or in log files showing the
CLI args / QMP commands. It is possible to use AES-256-CBC to
encrypt the secret values though, in which case all that is
visible is the ciphertext. For ad hoc developer testing though,
it is fine to provide the secrets directly without encryption
so this is not explicitly forbidden.
The anticipated scenario is that libvirtd will create a random
master key per QEMU instance (eg /var/run/libvirt/qemu/$VMNAME.key)
and will use that key to encrypt all passwords it provides to
QEMU via '-object secret,....'. This avoids the need for libvirt
(or other mgmt apps) to worry about file descriptor passing.
It also makes life easier for people who are scripting the
management of QEMU, for whom FD passing is significantly more
complex.
Providing data inline (insecure, only for ad hoc dev testing)
$QEMU -object secret,id=sec0,data=letmein
Providing data indirectly in raw format
printf "letmein" > mypasswd.txt
$QEMU -object secret,id=sec0,file=mypasswd.txt
Providing data indirectly in base64 format
$QEMU -object secret,id=sec0,file=mykey.b64,format=base64
Providing data with encryption
$QEMU -object secret,id=master0,file=mykey.b64,format=base64 \
-object secret,id=sec0,data=[base64 ciphertext],\
keyid=master0,iv=[base64 IV],format=base64
Note that 'format' here refers to the format of the ciphertext
data. The decrypted data must always be in raw byte format.
More examples are shown in the updated docs.
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2015-10-14 08:58:38 +00:00
|
|
|
crypto-obj-y += secret.o
|
2019-05-16 22:29:06 +00:00
|
|
|
crypto-rng-obj-$(CONFIG_GCRYPT) += random-gcrypt.o
|
|
|
|
crypto-rng-obj-$(if $(CONFIG_GCRYPT),n,$(CONFIG_GNUTLS)) += random-gnutls.o
|
|
|
|
crypto-rng-obj-$(if $(CONFIG_GCRYPT),n,$(if $(CONFIG_GNUTLS),n,y)) += random-platform.o
|
|
|
|
crypto-obj-y += $(crypto-rng-obj-y)
|
2015-10-14 12:14:04 +00:00
|
|
|
crypto-obj-y += pbkdf.o
|
2018-07-18 10:55:05 +00:00
|
|
|
crypto-obj-$(CONFIG_NETTLE) += pbkdf-nettle.o
|
|
|
|
crypto-obj-$(if $(CONFIG_NETTLE),n,$(CONFIG_GCRYPT)) += pbkdf-gcrypt.o
|
2015-10-15 11:35:28 +00:00
|
|
|
crypto-obj-y += ivgen.o
|
|
|
|
crypto-obj-y += ivgen-essiv.o
|
|
|
|
crypto-obj-y += ivgen-plain.o
|
|
|
|
crypto-obj-y += ivgen-plain64.o
|
2015-10-23 15:14:25 +00:00
|
|
|
crypto-obj-y += afsplit.o
|
2016-02-11 14:00:17 +00:00
|
|
|
crypto-obj-y += xts.o
|
2015-10-24 10:44:13 +00:00
|
|
|
crypto-obj-y += block.o
|
|
|
|
crypto-obj-y += block-qcow.o
|
2015-10-24 10:55:48 +00:00
|
|
|
crypto-obj-y += block-luks.o
|
2015-09-02 09:57:27 +00:00
|
|
|
|
2019-05-16 22:29:06 +00:00
|
|
|
# Let the userspace emulators avoid linking stuff they won't use.
|
|
|
|
crypto-user-obj-y = aes.o $(crypto-rng-obj-y) init.o
|
2015-10-31 05:39:52 +00:00
|
|
|
|
2015-10-14 12:14:04 +00:00
|
|
|
stub-obj-y += pbkdf-stub.o
|