]> git.proxmox.com Git - mirror_qemu.git/commit - tests/Makefile.include
crypto: switch hash code to use nettle/gcrypt directly
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 11 Mar 2016 18:09:22 +0000 (18:09 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 4 Jul 2016 09:47:09 +0000 (10:47 +0100)
commit0c16c056a4f9dec18fdd56feec82a5db9ff3c15e
treec670217045b5766136a86cb3612feda66fce64b1
parent8cbfc94269e37a001d501cca3f4e4cb4ba6dbe0a
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>
configure
crypto/Makefile.objs
crypto/hash-gcrypt.c [new file with mode: 0644]
crypto/hash-nettle.c [new file with mode: 0644]
crypto/hash-stub.c [new file with mode: 0644]
crypto/hash.c
tests/Makefile.include
tests/test-crypto-hash.c