diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2016-07-05 11:45:42 +0100 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2016-07-21 10:46:27 +0100 |
commit | 2165477c0f65d20fdfbdb2ddcd4e0e7fe8f61df5 (patch) | |
tree | 4661a97d6569cbebc436d81fe521e4c6da7871c9 /crypto/Makefile.objs | |
parent | f3c8355c7aaa89a5c5676756d4ba6139ea26b446 (diff) |
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 <berrange@redhat.com>
Diffstat (limited to 'crypto/Makefile.objs')
-rw-r--r-- | crypto/Makefile.objs | 2 |
1 files changed, 1 insertions, 1 deletions
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 |