diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2016-03-11 18:09:22 +0000 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2016-07-04 10:47:09 +0100 |
commit | 0c16c056a4f9dec18fdd56feec82a5db9ff3c15e (patch) | |
tree | c670217045b5766136a86cb3612feda66fce64b1 /crypto/Makefile.objs | |
parent | 8cbfc94269e37a001d501cca3f4e4cb4ba6dbe0a (diff) |
crypto: switch hash code to use nettle/gcrypt directly
Currently the internal hash code is using the gnutls hash APIs.
GNUTLS in turn is wrapping either nettle or gcrypt. Not only
were the GNUTLS hash APIs not added until GNUTLS 2.9.10, but
they don't expose support for all the algorithms QEMU needs
to use with LUKS.
Address this by directly wrapping nettle/gcrypt in QEMU and
avoiding GNUTLS's extra layer of indirection. This gives us
support for hash functions on a much wider range of platforms
and opens up ability to support more hash functions. It also
avoids a GNUTLS bug which would not correctly handle hashing
of large data blocks if int != size_t.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'crypto/Makefile.objs')
-rw-r--r-- | crypto/Makefile.objs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/Makefile.objs b/crypto/Makefile.objs index 0737f48118..1f86f4f07f 100644 --- a/crypto/Makefile.objs +++ b/crypto/Makefile.objs @@ -1,5 +1,7 @@ crypto-obj-y = init.o crypto-obj-y += hash.o +crypto-obj-$(CONFIG_NETTLE) += hash-nettle.o +crypto-obj-$(if $(CONFIG_NETTLE),n,$(CONFIG_GCRYPT)) += hash-gcrypt.o crypto-obj-y += aes.o crypto-obj-y += desrfb.o crypto-obj-y += cipher.o @@ -28,3 +30,4 @@ crypto-aes-obj-y = aes.o stub-obj-y += random-stub.o stub-obj-y += pbkdf-stub.o +stub-obj-y += hash-stub.o |