From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57128) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKlTU-0000H5-5P for qemu-devel@nongnu.org; Wed, 06 Jul 2016 07:58:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKlTR-0007Sa-1f for qemu-devel@nongnu.org; Wed, 06 Jul 2016 07:58:40 -0400 From: Alberto Garcia In-Reply-To: <1467715800-20379-2-git-send-email-berrange@redhat.com> References: <1467715800-20379-1-git-send-email-berrange@redhat.com> <1467715800-20379-2-git-send-email-berrange@redhat.com> Date: Wed, 06 Jul 2016 13:58:32 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v1 1/2] crypto: use glib as fallback for hash algorithm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Kevin Wolf , Fam Zheng , Max Reitz On Tue 05 Jul 2016 12:49:59 PM CEST, "Daniel P. Berrange" wrote: > 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. Sorry if I missed the explanation, but how do you disable them at runtime ? Berto