From 2165477c0f65d20fdfbdb2ddcd4e0e7fe8f61df5 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Tue, 5 Jul 2016 11:45:42 +0100 Subject: crypto: use glib as fallback for hash algorithm GLib >= 2.16 provides GChecksum API which is good enough for md5, sha1, sha256 and sha512. Use this as a final fallback if neither nettle or gcrypt are available. This lets us remove the stub hash impl, and so callers can be sure those 4 algs are always available at compile time. They may still be disabled at runtime, so a check for qcrypto_hash_supports() is still best practice to report good error messages. Signed-off-by: Daniel P. Berrange --- crypto/Makefile.objs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypto/Makefile.objs') diff --git a/crypto/Makefile.objs b/crypto/Makefile.objs index febffba313..a36d2d9bdf 100644 --- a/crypto/Makefile.objs +++ b/crypto/Makefile.objs @@ -2,6 +2,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-$(if $(CONFIG_NETTLE),n,$(if $(CONFIG_GCRYPT),n,y)) += hash-glib.o crypto-obj-y += aes.o crypto-obj-y += desrfb.o crypto-obj-y += cipher.o @@ -30,4 +31,3 @@ crypto-obj-y += block-luks.o crypto-aes-obj-y = aes.o stub-obj-y += pbkdf-stub.o -stub-obj-y += hash-stub.o -- cgit v1.2.3