]> git.proxmox.com Git - mirror_qemu.git/commit
crypto: use glib as fallback for hash algorithm
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 5 Jul 2016 10:45:42 +0000 (11:45 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 21 Jul 2016 09:46:27 +0000 (10:46 +0100)
commit2165477c0f65d20fdfbdb2ddcd4e0e7fe8f61df5
tree4661a97d6569cbebc436d81fe521e4c6da7871c9
parentf3c8355c7aaa89a5c5676756d4ba6139ea26b446
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>
crypto/Makefile.objs
crypto/hash-glib.c [new file with mode: 0644]
crypto/hash-stub.c [deleted file]